Closed
Bug 391295
Opened 18 years ago
Closed 18 years ago
APNG blending mode APNG_BLEND_OP_SOURCE not implemented
Categories
(Core :: Graphics: ImageLib, defect, P4)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla1.9beta1
People
(Reporter: Dolske, Assigned: asmith16)
References
()
Details
Attachments
(1 file, 3 obsolete files)
|
9.84 KB,
patch
|
Details | Diff | Splinter Review |
While working on my APNG editor, I found that I wasn't able to get this blend mode to work. I found a note on Andrew Smith's APNG page (http://littlesvr.ca/apng/) which indicated this hadn't been implemented, and just confirmed in email that it's still the case.
This flag is needed to help optimize APNG encoding. I have a script for the editor which will compare a frame with the previous frame, and crop to the bounding box of the differences. By using APNG_DISPOSE_OP_NONE with APNG_BLEND_OP_SOURCE, this can significantly reduce the size of some animations. (In one test, from 436K to 104K).
Encoding and decoding with this blend mode works, but yields the wrong result... It looks the same as APNG_BLEND_OP_OVER. I'd guess that the code responsible for compositing each frame for display isn't checking for this flag.
Flags: blocking1.9?
Comment 1•18 years ago
|
||
I'd like to get this in and it should be pretty straight easy.. Andrew or Alfred any chance you guys could take a look at this?
Updated•18 years ago
|
Flags: blocking1.9? → blocking1.9+
| Assignee | ||
Comment 3•18 years ago
|
||
The bulk of the fix is in imgContainer::DrawFrameTo().
Tested on Linux only, shouldn't be a problem on other platforms either. Here are a couple of samples to test:
http://littlesvr.ca/apng/images/keepandnoblend.png (APNG_BLEND_OP_OVER)
http://littlesvr.ca/apng/images/keepandblend.png (APNG_BLEND_OP_SOURCE)
Attachment #282349 -
Flags: review?(pavlov)
| Assignee | ||
Comment 4•18 years ago
|
||
Oh I forgot to mention it would be nice if there was a way to reset the cairo operator to the default, so use of defaultOperator in the patch woulnd't be needed. I couldn't find such a function.
| Assignee | ||
Comment 5•18 years ago
|
||
oops, that was the wrong patch.
Attachment #282349 -
Attachment is obsolete: true
Attachment #282351 -
Flags: review?(pavlov)
Attachment #282349 -
Flags: review?(pavlov)
Comment 6•18 years ago
|
||
Comment on attachment 282351 [details] [diff] [review]
fix
i do'nt think the change to frameDisposalMethod in gfxIImageFrame is needed is it? Since you're adding a new blendMethod attribute you need to generate a new UUID for the interface.
the rest looks fine
| Assignee | ||
Comment 7•18 years ago
|
||
Same fix with both concerns from comment #6 addressed.
Attachment #282351 -
Attachment is obsolete: true
Attachment #285167 -
Flags: review?(pavlov)
Attachment #282351 -
Flags: review?(pavlov)
Updated•18 years ago
|
Attachment #285167 -
Flags: review?(pavlov) → review+
Updated•18 years ago
|
Keywords: checkin-needed
Priority: -- → P4
Updated•18 years ago
|
Attachment #285167 -
Flags: approval1.9?
Updated•18 years ago
|
Keywords: checkin-needed
Comment 8•18 years ago
|
||
it would be nice to get this in for beta as it will be the first big release with APNG support. low risk, good upside, but not critical.
Comment 9•18 years ago
|
||
Comment on attachment 285167 [details] [diff] [review]
fix
Clear to land for M9. Please do so ASAP.
Attachment #285167 -
Flags: approval1.9? → approval1.9+
Updated•18 years ago
|
Keywords: checkin-needed
Comment 10•18 years ago
|
||
unbitrotten patch for check-in
Attachment #285167 -
Attachment is obsolete: true
Comment 11•18 years ago
|
||
Checking in gfx/idl/gfxIImageFrame.idl;
/cvsroot/mozilla/gfx/idl/gfxIImageFrame.idl,v <-- gfxIImageFrame.idl
new revision: 1.18; previous revision: 1.17
done
Checking in gfx/src/shared/gfxImageFrame.cpp;
/cvsroot/mozilla/gfx/src/shared/gfxImageFrame.cpp,v <-- gfxImageFrame.cpp
new revision: 1.42; previous revision: 1.41
done
Checking in gfx/src/shared/gfxImageFrame.h;
/cvsroot/mozilla/gfx/src/shared/gfxImageFrame.h,v <-- gfxImageFrame.h
new revision: 1.13; previous revision: 1.12
done
Checking in modules/libpr0n/decoders/png/nsPNGDecoder.cpp;
/cvsroot/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp,v <-- nsPNGDecoder.cpp
new revision: 1.73; previous revision: 1.72
done
Checking in modules/libpr0n/public/imgIContainer.idl;
/cvsroot/mozilla/modules/libpr0n/public/imgIContainer.idl,v <-- imgIContainer.idl
new revision: 1.12; previous revision: 1.11
done
Checking in modules/libpr0n/src/imgContainer.cpp;
/cvsroot/mozilla/modules/libpr0n/src/imgContainer.cpp,v <-- imgContainer.cpp
new revision: 1.58; previous revision: 1.57
done
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M9
You need to log in
before you can comment on or make changes to this bug.
Description
•