jimp-dev/jimp

[Bug] Weird BMP load bug

Open

#802 opened on Oct 5, 2019

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

Description

Expected Behavior

The copied bmp file should be exactly the same as the original one.

Current Behavior

For some reason for this bmp file content gets moved/shifted. It does not happen for all the bmp files.

Failure Information (for bugs)

Steps to Reproduce

I've created minial reproducible repo:

git git@github.com:elderapo/jimp-bmp-bug.git
cd ./jimp-bmp-bug
yarn
yarn start

Screenshots from.bmp to.bmp

Context

  • Jimp Version: ^0.8.4
  • Operating System: Ubuntu 14.04
  • Node version: v11.10.0, v12.10.0

Failure Logs

The loading system for bmp files seems to be broken. Exact same thing happens when reading bmp file from disk, buffer. Even when file is saved to a different format it still gets shifted.

Contributor guide