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

BMP image changes colour when loaded by JIMP #844

Open
GeoMarkou opened this issue Feb 7, 2020 · 2 comments
Open

BMP image changes colour when loaded by JIMP #844

GeoMarkou opened this issue Feb 7, 2020 · 2 comments
Labels
bug there is a bug in the way jimp behaves help wanted

Comments

@GeoMarkou
Copy link

Expected Behavior

Colour of BMP image shouldn't change.

Current Behavior

The reds turn to green, and the blues turn to red.

Failure Information (for bugs)

Seems related to the endian of the BMP perhaps?

Steps to Reproduce

I have a replication of this bug in a code sandbox. After reading the bmp and turning it into a base64 it changes the colours. I've included the image in the sandbox.

https://codesandbox.io/s/angry-gauss-nnd63?fontsize=14&hidenavigation=1&theme=dark

Screenshots
image

Context

We have a part of our application where users can upload their own images and apply filters to them. Some user images may be in BMP format.

  • Jimp Version: codesandbox's
  • Operating System: Windows 10
  • Node version: codesandbox's

Failure Logs

n/a

@aecostas
Copy link

aecostas commented Feb 17, 2020

Same here. In my case red is converted to yellow/orange; and black to red

@GeoMarkou, do you know any previous version where it worked?

@GeoMarkou
Copy link
Author

@aecostas I just noticed this issue recently, not sure when this behaviour would have changed.

If JIMP uses bmp-js like this pull request suggests (#530), I found a maybe-relevant issue on bmp-js itself (shaozilee/bmp-js#16)

@hipstersmoothie hipstersmoothie added help wanted bug there is a bug in the way jimp behaves labels Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug there is a bug in the way jimp behaves help wanted
Projects
None yet
Development

No branches or pull requests

3 participants