jimp-dev/jimp

16 bit tiff does not convert properly

Open

#806 opened on Oct 19, 2019

View on GitHub
 (3 comments) (1 reaction) (0 assignees)JavaScript (13,218 stars) (785 forks)batch import
bughelp wanted

Description

Expected Behavior

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

Current Behavior

Images that look like this:

image

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

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