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

Corrected BMP palette size when saving #6573

Closed
wants to merge 1 commit into from

Conversation

radarhere
Copy link
Member

Resolves #6572

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

That meant that when saving BMP images, the palette might be smaller than 256 colors. However, BmpImagePlugin always specifics the number of colors in the palette as 256 for P images.

This PR changes it to match the length of the palette.

@radarhere
Copy link
Member Author

I've made this part of #6500

@radarhere radarhere closed this Sep 14, 2022
@radarhere radarhere deleted the bmp branch September 14, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid 8-bit BMP files written when not all palette colours are used
1 participant