jimp-dev/jimp

BMP image changes colour when loaded by JIMP

Open

#844 opened on Feb 7, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (13,218 stars) (785 forks)batch import
bughelp wanted

Description

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

Contributor guide