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

Add support for BGR/RGB #16

Open
pablodgonzalez opened this issue Oct 20, 2017 · 4 comments
Open

Add support for BGR/RGB #16

pablodgonzalez opened this issue Oct 20, 2017 · 4 comments

Comments

@pablodgonzalez
Copy link
Contributor

both formats are valids and many software open those formats correctly

@LinusU
Copy link

LinusU commented Nov 15, 2017

Just tried this library and are getting some strange colors, could this be the cause?

This is the file:
905.bmp.zip

This is how preview on macOS renders it:
905

@pablodgonzalez
Copy link
Contributor Author

Yes! it is.
I've have not time to research. I don't know if it is BGR/RGB or if it is BMP 32bits without alpha. I've hope somebody know about it.

@LinusU
Copy link

LinusU commented Nov 20, 2017

Hehe, actually, it turns out that the image is just a common normal bmp. The problem is that I tried to use the output as an ImageData, which expects the data to be RGBA, but bmp-js outputs it as BGRA.

I was looking thru the file with a hex-editor and couldn't for the life of me figure out where it would be specified that it would have a non-standard color order 😂

@mooyoul
Copy link

mooyoul commented Sep 4, 2018

#19 provides solution of this ;)

also, i have forked version of bmp-js to prevent incorrect color issues.
See: #19 (comment)

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

No branches or pull requests

3 participants