jimp-dev / jimp-dev/jimp

[Bug] Weird BMP load bug

Open
#802 9 comments 2 reactions 0 assignees View on GitHub
bug help wanted solution in issue
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

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](https://github.com/elderapo/jimp-bmp-bug):

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

**Screenshots**
![from.bmp](https://raw.githubusercontent.com/elderapo/jimp-bmp-bug/master/from.bmp)
![to.bmp](https://raw.githubusercontent.com/elderapo/jimp-bmp-bug/master/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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.