Closed Bug 441971 Opened 17 years ago Closed 16 years ago

APNG_BLEND_OP_OVER not supported for apng's with indexed color (color type 3)

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- .7-fixed

People

(Reporter: reto.hoehener, Assigned: glennrp+bmo)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 Is it possible that the blend op 'OVER' is not supported for apngs with indexed color? Reproducible: Always Steps to Reproduce: Try to open the attached file animated.png with firefox 3. Actual Results: Firefox says: The image "animated.png" cannot be displayed, because it contains errors. Expected Results: Not sure if this is expected behavior or not.
Attached image frame 1 of animated.png
Attached image frame 2 of animated.png
Attached image frame 3 of animated.png
Attachment #326848 - Attachment description: animated png create from 1-3.png (indexed color, blend op 'over') → animated png created from 1-3.png (indexed color, blend op 'over')
OS: Windows XP → All
Hardware: PC → All
Confirming with Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 The attachment is a valid APNG file. Firefox fails to render APNG with uncommon pixel formats. Check the "Other depths and colour types" section on: http://philip.html5.org/tests/apng/tests.html
Blocks: png3
Blocks: 455140
I think this patch will also fix (or partly fix) bug #455140
Assignee: nobody → glennrp
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
@joe, please make a triserver build with this patch. You can combine it with the one I requested yesterday in bug #463465 or make a separate build -- your call.
Fixed malformed comment that had an extra "*/"
Attachment #326848 - Attachment is obsolete: true
Attachment #380807 - Attachment is obsolete: true
I believe the purpose of the code that the patch removes was to save CPU cycles in blending opaque images. Throwing a png_error() seems an excessive response; a png_warning() is more appropriate. Also the test was incorrect because it did not account for the possibility of a tRNS chunk in truecolor or grayscale images. Furthermore, the test rejects indexed-color PNGs but throws an error saying it is rejecting a truecolor PNG. Instead, we will simply ignore PNG_BLEND_OP_OVER in opaque images and use the simpler PNG_BLEND_OP_SOURCE, which produces the same result for opaque images, instead.
Glenn: Pushed a try build for you with the contents of bug 463465, bug 441971, and bug 397593. FYI, they don't apply perfectly cleanly in sequence, though it's not a problem in practice. applying bug441971 applying bug397593 applying bug463465 patching file modules/libimg/png/MOZCHANGES Hunk #1 succeeded at 6 with fuzz 2 (offset 3 lines). Now at: bug463465 The builds will show up in https://build.mozilla.org/tryserver-builds/?C=M;O=D with userid jdrew@mozilla.com and some random other ID (possibly a27690563c17).
The test case looks OK with the v1 patch. It's tiny, so look carefully. It's easier to see in favicons in the bookmark and the navigation window.
Attachment #326848 - Attachment is obsolete: false
Attachment #380808 - Flags: superreview?(tor)
Attachment #380808 - Flags: review?(joe)
The v1 patch is incorporated in the libpng-1.2.37 patch (bug #492200) If this one gets checked in before libpng-1.2.37 then I'll revise the libpng-1.2.37 patch to avoid merge conflict. If libpng patch gets checked in first then this one will become obsolete.
Depends on: 492200
Attachment #380808 - Flags: superreview?(vladimir)
Attachment #380808 - Flags: superreview?(tor)
Attachment #380808 - Flags: review?(joe)
Attachment #380808 - Flags: review+
Comment on attachment 380808 [details] [diff] [review] Eliminate too-stringent test for opaque images with blend_op==OVER (v1) Just delete the "following code deleted" code.
Attachment #380808 - Flags: superreview?(vladimir) → superreview+
Attachment #382889 - Flags: review?(joe)
Attachment #382889 - Flags: review?(joe) → review+
Attachment #382889 - Flags: superreview?(vladimir)
Attachment #382889 - Flags: superreview?(vladimir) → superreview+
Attachment #380808 - Attachment is obsolete: true
Attachment #382889 - Flags: approval1.9.1?
Can this one be approved for check-in?
Depends on: 504805
Flags: wanted1.9.2?
Fixed by landing of bug 504805.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Attachment #382889 - Flags: approval1.9.2?
Attachment #382889 - Flags: approval1.9.1.7?
Attachment #382889 - Flags: approval1.9.0.17?
Comment on attachment 382889 [details] [diff] [review] Eliminate too-stringent test for opaque images with blend_op==OVER (v2) approval1.9.2 requests aren't currently being monitored, since we're nearing RC freeze and there are too many outstanding requests, so I'm clearing this request. Feel free to re-request approval if you are confident that it's worth drivers' time to consider whether this non-blocker needs to land for 1.9.2 at this stage.
Attachment #382889 - Flags: approval1.9.2?
Comment on attachment 382889 [details] [diff] [review] Eliminate too-stringent test for opaque images with blend_op==OVER (v2) 1.9.2.x is the place to fix this, or 1.9.2 final if you're willing to lobby the right folks (outside of bugzilla)
Attachment #382889 - Flags: approval1.9.1.7?
Attachment #382889 - Flags: approval1.9.1.7-
Attachment #382889 - Flags: approval1.9.0.17?
Attachment #382889 - Flags: approval1.9.0.17-
Not fixed in Firefox 3.6.3 This bugfix is super safe. Could it be included into 3.6.x branch?
Comment on attachment 382889 [details] [diff] [review] Eliminate too-stringent test for opaque images with blend_op==OVER (v2) Only if you ask for approval on the patch. But note that you'll have to find someone to land this...
Attachment #382889 - Flags: approval1.9.2.4?
Comment on attachment 382889 [details] [diff] [review] Eliminate too-stringent test for opaque images with blend_op==OVER (v2) a=LegNeato for 1.9.2.5. Please ONLY land this on mozilla-1.9.2 default, as we are still working on 1.9.2.4 on the relbranch
Attachment #382889 - Flags: approval1.9.2.4? → approval1.9.2.5+
I need a "check-in buddy" to get this in to the 1.9.2 branch. Please check the patch in and set the "status1.9.2" field to ".6-fixed". Code-freeze for the 1.9.2.6 release is planned for the end of next week. Please land soon and don't leave it to the last minute.
Keywords: checkin-needed
Whiteboard: checkin-needed to 1.9.2
Whiteboard: checkin-needed to 1.9.2 → [checkin-needed to 1.9.2]
Attachment #382889 - Flags: approval1.9.2.5+ → approval1.9.2.6+
Come on, Mozilla. The patch got review+ and superreview+ in June 2009. Nobody can use optimized APNG files on the web, the same way optimized GIFs are used, thanks to this bug.
(In reply to comment #23) > Come on, Mozilla. The patch got review+ and superreview+ in June 2009. Fair enough. I'll land this tomorrow on mozilla-1.9.2 default assuming it applies cleanly.
pushed to 1.9.2 as http://hg.mozilla.org/releases/mozilla-1.9.2/rev/cda37351e026 Resolving fixed. Let me know if this needs to be applied anywhere else.
Keywords: checkin-needed
Whiteboard: [checkin-needed to 1.9.2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: