Skip to content

Set color table fourth channel to zero for 1 and L mode when saving BMP #8889

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Apr 13, 2025

Resolves #8888

https://www.ece.ualberta.ca/~elliott/ee552/studentAppNotes/2003_w/misc/bmp_file_format/bmp_file_format.htm states that the fourth channel in a BMP color table is 'unused (=0)'.

It seems reasonable to do so when saving 1 and L mode BMPs, and makes more intuitive sense than our current strategy of setting the fourth channel to the same value as the other three.

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.

BmpImagePlugin save palette (in "1" mode) sets a "should probably be 0" value to 255...
1 participant