jimp-dev / jimp-dev/jimp

16 bit tiff does not convert properly

Open
#806 3 comments 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

# Expected Behavior

one to one conversion from 16 bit tiff to (presumably) 8 bit jpg

# Current Behavior

Images that look like this:

![image](https://user-images.githubusercontent.com/177243/67148705-411ce500-f257-11e9-838c-8a9fb48d3348.png)

this is supposed to be an X-Rite color passport, a piece of equipment for color calibration, on a poorly lit but supposedly white background:

![image](https://user-images.githubusercontent.com/177243/67148804-7bd34d00-f258-11e9-85d8-aaec7cf99bcd.png)

# Failure Information (for bugs)

It seems like the 16 bit tiff data is getting _processed_ as 8 bit data, I don't know if it's throwing away the top byte in each two-byte pair, or whether it's pretending a single 16 bit value is actually two consecutive single byte values, but it's definitely very wrong.

## Steps to Reproduce

1. Generate a 16 bit TIFF image in any random image editor (photoshop, gimp, what have you)
2. Make Jimp convert it to jpeg (either with `write` or `getBuffer` etc)

## Context

This might be an example of #664

- Jimp Version: 0.8.5
- Operating System: Win10 x64
- Node version: 12

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.