Skip to content

APNG - use previous frame with dispose action to draw the next frame#5071

Closed
stevemcgf wants to merge 1 commit intopython-pillow:masterfrom
stevemcgf:apng-bugfix
Closed

APNG - use previous frame with dispose action to draw the next frame#5071
stevemcgf wants to merge 1 commit intopython-pillow:masterfrom
stevemcgf:apng-bugfix

Conversation

@stevemcgf
Copy link
Copy Markdown

@stevemcgf stevemcgf commented Nov 30, 2020

APNG defines a dispose operation after each frame. This dispose should
be done before drawing the next frame. PNG code stores this frame on _prev_im
but it is not used to draw the next frame.
This change use the _prev_im as the base to draw the next frame.

Helps #5032

Changes proposed in this pull request:

  • Fixes APNG load. Use previous frame with dispose action applied to draw the next frame.

Tested with the files in the issue #5032

APNG defines a dispose operation after each frame. This dispose should
be done before drawing the next frame. PNG code stores this frame on _prev_im
but it is not used to draw the next frame.
This change use the _prev_im as the base to draw the next frame.
@radarhere radarhere changed the title APNG - use previous frame with dispose action to draw the next frame. APNG - use previous frame with dispose action to draw the next frame Nov 30, 2020
@radarhere
Copy link
Copy Markdown
Member

I've created #5126 as an alternative to this.

@radarhere
Copy link
Copy Markdown
Member

#5126 has been merged

@radarhere radarhere closed this Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants