Skip to content

Conversation

@radarhere
Copy link
Member

#6060 contained a commit entitled "Allow getpalette() to return less than 256 colors"

This meant that there were fewer bytes when saving in IM.

fp.write(im.im.getpalette("RGB", "RGB;L")) # 768 bytes

But IM still expected 768 bytes when reading.

palette = self.fp.read(768)

So this PR pads the palette to 768 bytes when saving.

@hugovk hugovk merged commit 5076d34 into python-pillow:main Oct 11, 2022
@radarhere radarhere deleted the im branch October 11, 2022 20:57
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.

2 participants