Closed Bug 849590 Opened 11 years ago Closed 10 years ago

GIF image is rendered upside-down after high-quality downscaling

Categories

(Core :: Graphics: ImageLib, defect)

19 Branch
x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
firefox19 --- affected
firefox20 - affected
firefox21 - affected
firefox22 - affected

People

(Reporter: dimitrisdad, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130307122351

Steps to reproduce:

This is a new behavior with 19.0.2 on Ubuntu.  Just visiting the site www.itio-a-child.org


Actual results:

The graphic of a sailboat drawn by a child initially renders correctly.  Then something else on the page renders (not quite sure what it is), and then the graphic wraps with the bottom showing at the top, and the right showing at the left.  The thumbnail for the site in the index tape shows correctly.

See the attached screenshot.  It shows the graphic wrapped, the bit at the top should be at the bottom, and you can see the front of the sail poking off the right and wrapping into the left.  


Expected results:

Nothing as far as I know.   The graphic should have stayed the same.
Attached file Reduced testcase
Firefox loads fine the GIF image from top to bottom, but after that, it applies some image decoding/scaling algorithm then the image becomes "upside-down". I think it's due to GIF metadata/format or something like that.

The effect can be replicate after switching to another tab when FF discards the image from the previous tab.

Regression range:
m-c
good=2012-10-17
bad=2012-10-18
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dac5700acf8b&tochange=cb573b9307e5

Suspected bug: bug 795940

Workaround: image.high_quality_downscaling.enabled=false fixes the issue.
Blocks: 795940
Status: UNCONFIRMED → NEW
Component: Untriaged → ImageLib
Ever confirmed: true
Keywords: regression, testcase
OS: Linux → All
Product: Firefox → Core
Summary: Firefox shuffles graphic putting part of the bottom at the top, and the left at the right → GIF image is rendered upside-down after high-quality downscaling
Since bug 795940 was fixed in 18 and this has a workaround, there's no need to track here but if a low-risk fix is available please nominate for uplift.
Attached image firefox_messed_up.png
Summary: GIF image is rendered upside-down after high-quality downscaling → GIF image is shuffled [2010] - then rendered upside-down [2012] after high-quality downscaling - now has extending bar [2013] v 23 to v25
No need to add extra screenshots or make the title difficult to understand. The issue is identified and there is a reduced testcase showing the bug.
Summary: GIF image is shuffled [2010] - then rendered upside-down [2012] after high-quality downscaling - now has extending bar [2013] v 23 to v25 → GIF image is rendered upside-down after high-quality downscaling
It's fixed in FF35.

Working range:
bad=2014-09-15
good=2014-09-16
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=bf5fcc0c4b27&tochange=3b7921328fc1

Surely fixed by one of Seth's patches: Bug 1060200, Bug 1054079 or Bug 1057903.
Flags: needinfo?(seth)
I'd guess this bug was caused by padding being incorrectly applied to the HQ-scaled image. HQ scaling is applied to the image after it has been decoded, so it was initially hard to understand how this could only affect GIFs, but GIFs are the only image format I'm aware of where encoders apply padding to single-frame images, so the padding explanation would make sense.

That means it was probably fixed by bug 1057903 and the recent followup bugs to it, including bug 1067207, that fixed padding issues in imagelib. Michael Wu also wrote some of those patches.

I'm not sure which patch specifically fixed it but I'll go ahead and resolve this bug, blocking it against bug 1067207.
Status: NEW → RESOLVED
Closed: 10 years ago
Depends on: 1067207
Flags: needinfo?(seth)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: