-
-
Notifications
You must be signed in to change notification settings - Fork 890
Fix animated png handling (issue #2708) #2710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
|
Note. We'll want to backport this to target the release/v3.1.x branch also. |
|
This can be backported to release/3.1.x with a simple cherry-pick. I can make a PR for that if you want. |
That would be amazing if you can! |
| /// <summary> | ||
| /// Gets or sets a value indicating whether the default image is shown as part of the animated sequence | ||
| /// </summary> | ||
| public bool DefaultImageAnimated { get; set; } = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call this AnimateRootFrame. That matches ImageFrameCollection.RootFrame naming convention.
JimBobSquarePants
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thanks for your perseverance.
If we can change the property name, then I will approve this for merging.
Thanks!
|
Realized that while this fixes the decoder, the encoder has the same issue with not respecting disposal method. |
|
Can you please check the code at #2882 As far as I’m aware we’ve covered anything missing there. |
|
Checked that and it doesn't fix it, I'll try to get a minimal reproduction. Would you prefer a separate issue? |
|
I’d like to get any fixes incorporated into that PR. Could you please add a comment there with the relevant detail. Thanks! |
Prerequisites
Description
Identified and fixed the issues mentioned in issue #2708.
Fix: ProcessInterlacedPaletteScanline now respects frameControl.XOffset
Fix: PngDecoderCore handling of PngDisposalMethod.RestoreToBackground and RestoreToPrevious, for specification compliance.
Metadata change: Added DefaultImageAnimated to PngMetadata. The apng format allows for the first frame to not be part of the animation sequence, which needs to be visible to users.
Fix: Decoding and encoding when the default image is not animated