AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2005.03.22 17:20 "tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 18:03 "Re: tif_jpeg.c and 12bit JPEG Files", by Lee Howard
2005.03.22 18:17 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 18:33 "Re: tif_jpeg.c and 12bit JPEG Files", by Joris Van Damme
2005.03.22 18:04 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 18:10 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 18:22 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 20:00 "Re: tif_jpeg.c and 12bit JPEG Files", by David Gilbert
2005.03.22 20:25 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 20:38 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 21:59 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.22 22:28 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam
2005.03.22 22:41 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.29 11:24 "Re: tif_jpeg.c and 12bit JPEG Files", by Jean-yves Le Ridant
2005.03.29 16:08 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.04.01 08:08 "Re: tif_jpeg.c and 12bit JPEG Files", by Jean-yves Le Ridant
2005.03.22 21:19 "Re: tif_jpeg.c and 12bit JPEG Files", by Chris Cox
2005.03.22 21:36 "Re: tif_jpeg.c and 12bit JPEG Files", by Bob Friesenhahn
2005.03.31 10:04 "Re: tif_jpeg.c and 12bit JPEG Files", by Jean-yves Le Ridant
2005.03.22 21:37 "Re: tif_jpeg.c and 12bit JPEG Files", by Chris Losinger
2005.03.23 14:08 "Re: tif_jpeg.c and 12bit JPEG Files", by Jeff Mather

2005.03.22 20:38 "Re: tif_jpeg.c and 12bit JPEG Files", by Frank Warmerdam

On Tue, 22 Mar 2005 14:25:45 -0600 (CST), Bob Friesenhahn wrote:
> This is not really compatible with the way the libtiff interfaces
> work.  Libtiff normally provides the data as a scanline, strip, or
> tile where the bits-per-sample of the data is the same as reported by
> libtiff, and the values occupy the full range of the sample.  As part
> of the "decompress" step, the data should be converted to packed
> 12-bit form.  This can easily be done "in-place" if necessary while
> reading since 12-bits is smaller than 16-bits.  A secondary buffer
> would be needed while writing.

Bob, 

I have modified the JPEGDecode in tif_jpeg.c to take care of
repacking the 16bit data into 12bit packed format.  BTW, the
changes are now all committed in tif_jpeg.c in the CVS head
for libtiff for use with the Mk1 libjpeg. 

> In order to make 12-bit JPEG in TIFF available to a broader variety of
> applications, an option could be provided via a virtual tag (similar
> to that used by the LogLuv support) to set libtiff in a mode where
> 12-bit JPEG in TIFF pretends to be a 16-bit format.  12-bit JPEG in
> TIFF files would be reported as 16-bits/sample.  In this case the
> samples should be scaled to 16-bits.  The only change necessary for
> applications already supporting 16-bit TIFF is to set the option
> requesting that 12-bit TIFF be supported like 16-bit TIFF.

While I agree this would be desirable (auto-upgrade to 16bit), 
I am not personally keen to try and implement it.  It might be
fairly challenging to do properly without any adverse effects.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent