Open Bug 1940233 Opened 1 month ago Updated 2 days ago

avif file fails to decode

Categories

(Core :: Graphics: ImageLib, defect, P3)

Firefox 133
defect

Tracking

()

UNCONFIRMED

People

(Reporter: sean, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0

Steps to reproduce:

Browse to:
https://www.teletech.com.au/attachments/121_800_598-900%201810%20916.avif
The file in question is also attached.

I cannot convince myself that this bug is covered by https://bugzilla.mozilla.org/show_bug.cgi?id=1696090

This file was produced by a batch process, working through a directory and resampling less compressed files using ImageMagick. Almost all of the resultant files work but a small number fail.

The command to do this was invoked in python using the subprocess.run standard library function with:

            result = subprocess_run(
                [
                    self.magick_path,
                    f"{ job.src_format.wand_type }:{ job.src_path }",
                    '-strip',
                    '-colorspace', 'srgb',
                    '-resize', f"{ job.dst_width }x{ job.dst_height }",
                    f"{ job.dst_format.wand_type }:{ job.dst_path }",
                ],
                text = True,
                env = {},
                capture_output = True,
            )

Actual results:

A one line error message:
The image "..." cannot be displayed because it contains errors.

This image displays correctly in Chrome and Edge.

Expected results:

Displays the image.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: ImageLib' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: ImageLib
Product: Firefox → Core

Thanks for filing.

If I set image.avif.compliance_strictness to 0 in about:config then the image works.

In a debug build I see:
[WARN mp4parse] Rotation(D180) is missing required 'essential' bit
[WARN mp4parse] InvalidData(TxformNoEssential)
[ERROR mp4parse] Invalid property order: ispe after irot

So it looks like we are being a little bit stricter.

Perhaps you could let imagemagick know about this while we look into this?

Re: "Perhaps you could let imagemagick know about this while we look into this?"
Unfortunately, I have little control over the version of ImageMagic my cPanel hoster makes available. I get whatever version is bundled in the cPanel distribution my hoster uses. Reporting bugs is difficult if I don't have access to the latest release.

If I knew more about what exactly the problem was, I might be able to search the ImageMagick and libheif bug registries.

The Current version I have is:

$ magick --version
Version: ImageMagick 7.1.1-39 Q16-HDRI x86_64 22428 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5)
Delegates (built-in): bzlib cairo fftw fontconfig freetype gvc heic jbig jng jp2 jpeg lcms lqr lzma openexr pangocairo png raqm raw rsvg tiff webp wmf x xml zlib
Compiler: gcc (8.5)

magick -list format
   Format  Mode  Description
-------------------------------------------------------------------------------
     AVIF  rw+   AV1 Image File Format (1.15.2)
     HEIC  rw+   High Efficiency Image Format (1.15.2)
     HEIF  rw+   High Efficiency Image Format (1.15.2)

Do you have the original image and command line that was used to produce the avif in quesiton?

The source image is online here:
https://www.teletech.com.au/attachments/121-900%201810%20916.JPG

I've just run this command now and produced a perfect byte-for-byte copy of the avif file I posted above.

magick convert "JPG:121-900 1810 916.JPG" -strip -colorspace srgb -resize 800x598 "avif:tmp.avif"

@tnikkel: Can you assign severity here?

Flags: needinfo?(tnikkel)
Severity: -- → S3
Flags: needinfo?(tnikkel)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: