Skip to content
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

Improved efficiency when creating GIF disposal images #5326

Merged
merged 2 commits into from Mar 20, 2021

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Mar 14, 2021

Two changes.

  1. Do not call self.im.copy(), only to then call self._crop - self._crop already creates a copy of the image.
  2. Instead of creating a solid color image of self.size and then cropping it, just create the solid color image at the necessary size.

@radarhere radarhere added the GIF label Mar 14, 2021
@hugovk
Copy link
Member

hugovk commented Mar 20, 2021

Thanks!

@hugovk hugovk merged commit 82b2f4a into python-pillow:master Mar 20, 2021
@radarhere radarhere deleted the gif_disposal branch March 20, 2021 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants