jimp-dev/jimp

16 bit tiff does not convert properly

開放

#806 建立於 2019年10月19日

 (3 則留言) (1 個反應) (0 位負責人)JavaScript (785 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (13,218 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南