jimp-dev/jimp

BMP image changes colour when loaded by JIMP

Open

#844 创建于 2020年2月7日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)JavaScript (13,218 star) (785 fork)batch import
bughelp wanted

描述

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

贡献者指南

BMP image changes colour when loaded by JIMP · jimp-dev/jimp#844 | Good First Issue