Open pablodgonzalez opened 6 years ago
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:
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.
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 😂
also, i have forked version of bmp-js to prevent incorrect color issues. See: https://github.com/shaozilee/bmp-js/pull/19#issuecomment-418508638
both formats are valids and many software open those formats correctly