2007.01.31 16:39 "[Tiff] 16bit grayscale with colormap", by Reinhard Mayr aka Czerwinski

2007.01.31 18:50 "Re: [Tiff] 16bit grayscale with colormap", by Reinhard Mayr aka Czerwinski

Hmmm... I go the same message with ImageMagick's imdisplay.exe. Maybe the error message is just a bit too un-exact: the color map is there (according to the dump), maybe it's just about the unexpected length of 192kB instead of 256 byte? The values of the dump represent exactly what I have in the color map (repeated ASCII "0123456789ABCDEF").

Does GraphMagick do a length check for that tag?

-------- Original-Nachricht --------
Datum: Wed, 31 Jan 2007 11:53:41 -0600 (CST)
Von: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
An: Reinhard Mayr aka Czerwinski <czerwinski1977@gmx.net>
CC: tiff@lists.maptools.org
Betreff: Re: [Tiff] 16bit grayscale with colormap

On Wed, 31 Jan 2007, Reinhard Mayr aka Czerwinski wrote:

> Bob,
>

> thanks for that quick response! Attached there is the mentioned sample file I created with a hex editor. (The colormap contains just crap data but should be enough for a proof of concept.) The opening behavior of some programs was described in my initial post.

>
> How can you display the file?

No, I can not. In fact libtiff's tiffinfo does not like the file

either (libtiff fails to locate the colormap) so it seems that the

file is not formulated correctly:

% tiffinfo CytoScout16bitImageJ-0106_3-v5.tif

CytoScout16bitImageJ-0106_3-v5.tif: Error fetching data for field "ColorMap".

MissingRequired: CytoScout16bitImageJ-0106_3-v5.tif: TIFF directory is missing required "Colormap" field.

% tiffdump CytoScout16bitImageJ-0106_3-v5.tif

CytoScout16bitImageJ-0106_3-v5.tif:
Magic: 0x4d4d <big-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) SHORT (3) 1<200>
ImageLength (257) SHORT (3) 1<200>
BitsPerSample (258) SHORT (3) 1<16>
Photometric (262) SHORT (3) 1<3>

ImageDescription (270) ASCII (2) 34<ImageJ=1.37v\nmin=57.0\nma ...>

StripOffsets (273) LONG (4) 1<768>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<200>
StripByteCounts (279) LONG (4) 1<80000>
Colormap (320) SHORT (3) 196608<12337 12851 13365 13879 14393 16706
17220 17734 12337 12851 13365 13879 14393 16706 17220 17734 12337
12851 13365 13879 14393 16706 17220 17734 ...>

The error reported by libtiff when used by GraphicsMagick is that it

fails to retrieve the colormap:

   Error fetching data for field "ColorMap".

--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer