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

stb_image_write.h monochrome BMP #53

Closed
Chribba opened this issue Nov 25, 2014 · 1 comment
Closed

stb_image_write.h monochrome BMP #53

Chribba opened this issue Nov 25, 2014 · 1 comment

Comments

@Chribba
Copy link

Chribba commented Nov 25, 2014

Hello!

The addition of monochrome TGA writing broke monochrome BMP writing. This is because BMP expects the single Y component to be expanded to RGB, while TGA writes the Y as is.

In write_pixels():
where it used to say "case 2: write3(f, d[0],d[0],d[0]);" (needed for BMP)
you now have "case 2: fwrite(d, 1, 1, f);" (needed for TGA)

@nothings
Copy link
Owner

Fixed in 0.96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants