Hi Bob and Even,
  (I'm copying Even's reply in this thread, and adding Darrell from 
libjpeg-turbo after consulting with him).
  Thank you for confirming libtiff does not support 16-bit JPEG.
  This is very puzzling to me.  I think it means that before I built libtiff 
v4.6.0 with libjpeg-turbo v3.0.0, we must have had a patch or modification in 
our libtiff version or our old libjpeg v6b version that allowed us to read the 
16-bit linearRaw subimage in the TIFF file.
  I'll do more investigation on our end.
  Thanks,
     ellen

--------------------------------


Hi,



16-bit (lossless) JPEG isn't supported by current libtiff. I guess it could by 
tweaking tif_jpeg.c



That said, 16-bit lossless JPEG doesn't shine by any aspect. You'd be much 
better using other lossy codecs. In GDAL we've experimented with JPEGXL. The 
codec is at 
https://github.com/OSGeo/gdal/blob/master/frmts/gtiff/tif_jxl.c<https://github.com/OSGeo/gdal/blob/master/frmts/gtiff/tif_jxl.c>
 . I'll probably try to upstream it once libjxl reaches its 1.0 milestone.



Even



From: Bob Friesenhahn <[email protected]>
Sent: Monday, February 5, 2024 4:43 PM
To: Ellen Johnson <[email protected]>
Cc: [email protected]
Subject: Re: [Tiff] error reading linearRaw subIFD from a TIFF file with 
libtiff built with libjpeg-turbo?

On Mon, 5 Feb 2024, Ellen Johnson wrote:

> I didn't do anything special when configuring libtiff v4.6.0 to build with 
> libjpeg-turbo, other than to make sure I saw the "dual mode" configuration 
> specification - if I remember correctly when I built libtiff v4.6.0, when it 
> looked for libjpeg-turbo it made sure some dual mode configuration was set to 
> enable 8- and 12-bit modes. Is there a config setting I might have missed 
> that enables working with 16-bit images?

It seems that "dual mode" is still "dual mode". I have not personally
tested with 16-bit JPEG in TIFF images. It seems likely that it is
not supported.

See the change notes at
https://libtiff.gitlab.io/libtiff/releases/v4.5.0.html<https://libtiff.gitlab.io/libtiff/releases/v4.5.0.html>

"autoconf/cmake: detect (not yet released) libjpeg-turbo 2.2 to take
into its capability of handling both 8-bit JPEG and 12-bit JPEG in a
single build."

I have also not specifically tested GraphicsMagick with 8/12/16 bit
JPEG (outside of TIFF) with the new libjpeg-turbo, although someone
told me that it was "working". It seems I should test it for myself.

Bob
--
Bob Friesenhahn
[email protected]<mailto:[email protected]>, 
http://www.simplesystems.org/users/bfriesen/<http://www.simplesystems.org/users/bfriesen>
GraphicsMagick Maintainer, 
http://www.GraphicsMagick.org/<http://www.GraphicsMagick.org>
Public Key, 
http://www.simplesystems.org/users/bfriesen/public-key.txt<http://www.simplesystems.org/users/bfriesen/public-key.txt>
_______________________________________________
Tiff mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/tiff

Reply via email to