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.h: failed assert for 32bpp bmp file #628

Closed
CptPotato opened this issue Jun 17, 2018 · 2 comments
Closed

stb_image.h: failed assert for 32bpp bmp file #628

CptPotato opened this issue Jun 17, 2018 · 2 comments

Comments

@CptPotato
Copy link

CptPotato commented Jun 17, 2018

I'm getting an assertion failure when trying to open a 32 bit per pixel bmp file. Is this a limitation of the library or a fault on my part?

Here's the message:

File: stb_image.h
Line: 5047
Expression: v >= 0 && v < 256

And here's a test image for reproduction: 32bpp.zip

@rygorous
Copy link
Collaborator

Definitely a bug; you might hit an error return on malformed files or files using unsupported features, but you should never hit an assert just from loading a file that stb_image doesn't understand.

@rygorous
Copy link
Collaborator

rygorous commented Jul 3, 2021

I can't reproduce this on current and believe this was fixed as a side effect of other changes in commit bfaccab which is part of the released version 2.26.

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