Navigation Menu

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

Fixed PyAccess after changing ICO size #6821

Merged
merged 1 commit into from Dec 23, 2022
Merged

Conversation

radarhere
Copy link
Member

As with GifImagePlugin

self.pyaccess = None
if "transparency" in self.info:
self.im.putpalettealpha(self.info["transparency"], 0)
self.im = self.im.convert("RGBA", Image.Dither.FLOYDSTEINBERG)
self.mode = "RGBA"
del self.info["transparency"]
else:
self.mode = "RGB"
self.im = self.im.convert("RGB", Image.Dither.FLOYDSTEINBERG)

and PngImagePlugin
self.im = self._prev_im
if self.pyaccess:
self.pyaccess = None

after replacing self.im, self.pyaccess should be cleared.

@hugovk hugovk merged commit 6fc0456 into python-pillow:main Dec 23, 2022
@radarhere radarhere deleted the pyaccess branch December 23, 2022 20:08
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.

None yet

2 participants