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
January 2007

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

2007.01.31 16:39 "16bit grayscale with colormap", by Reinhard Mayr Aka Czerwinski
2007.01.31 16:56 "Re: 16bit grayscale with colormap", by Toby Thain
2007.01.31 17:06 "Re: 16bit grayscale with colormap", by Bob Friesenhahn
2007.01.31 17:36 "Re: 16bit grayscale with colormap", by Phillip Crews
2007.01.31 18:49 "Re: 16bit grayscale with colormap", by Ed Grissom
2007.01.31 17:01 "Re: 16bit grayscale with colormap", by Bob Friesenhahn
2007.01.31 17:31 "Re: 16bit grayscale with colormap", by Joris Van Damme
2007.01.31 17:53 "Re: 16bit grayscale with colormap", by Bob Friesenhahn
2007.01.31 18:50 "Re: 16bit grayscale with colormap", by Reinhard Mayr Aka Czerwinski
2007.01.31 19:04 "Re: 16bit grayscale with colormap", by Bob Friesenhahn
2007.01.31 19:06 "Re: 16bit grayscale with colormap", by Phillip Crews
2007.02.01 09:56 "Re: 16bit grayscale with colormap", by Reinhard Mayr Aka Czerwinski
2007.01.31 19:50 "Re: 16bit grayscale with colormap", by Joris Van Damme

2007.01.31 17:31 "Re: 16bit grayscale with colormap", by Joris Van Damme

Reinhard,

Reinhard Mayr aka Czerwinski wrote:
> I deal with 16bit grayscale TIFFs. The files originate from a 12bit
> CCD, so the linear conversion 16bit->8bit turns my image almost
> black.

You can write 12bit grayscale. It is perfectly legit TIFF. However, few 
readers will support it. You can also rescale to a more common bitdepth, 
like 8bit or 16bit, before writing.

> To cope with that, I would like to add a ColorMap into the TIFF. For
> testing, I altered an existing 16bit file:
> o photometrics = 3 (ColorMap)
> o added a colormap (tag 0140), length: 3*2^16= 196608 bytes

You mean 3*2^16 words, not bytes. Palettes (Colormaps) in TIFF are 3 word 
values per palette entry.

> Is this a proper interpretation of the TIFF specs (TIFF6 specs p.23
> allow only 4/8 bits per sample -- why?)?

Yes it is  a proper interpretation of the TIFF spec. The pages you refer to, 
are *baseline* TIFF. The whole concept of baseline TIFF is a bit dated, as 
many flavours that aren't originally regarded baseline are commonly 
supported these days. But in any case, even originally, there wasn't a 
restriction to 4 or 8 bits per sample in Colormap TIFFs as long as you know 
they're not baseline.

In general, TIFF is extremely flexible this way. You can have a 21 bit 
Colormap TIFF, or a 36 bit grayscale TIFF, or an 11-13-15 bits per sample 
RGB TIFF. It's all unambigious, and all legit. It is, however, badly 
supported by most readers.


Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html