| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2004.08.20 08:25 "Tiff conversion using libtiff", by Ross A FinlaysonHi,
Here is a section of the code in the tiff2pdf.c file that checks when
the PhotometricIntepretation field is RGB that the number of samples is
3, for Red, Green, and Blue:
if(t2p->tiff_samplesperpixel==3){
break;
}
Later, it has
TIFF2PDF_MODULE,"No support for RGB image %s with %u samples per pixel",
TIFFFileName(input),t2p->tiff_samplesperpixel);
t2p->t2p_error = T2P_ERR_ERROR;
break;
I think your image is marked PhotometricInterpretation = 2 (RGB) when it
should be 3 (Palette). One way to check this is to check if the
ColorMap tag (320, 0x0140) exists, and then to follow the
SamplesPerPixel to see if it is 3, for RGB and other 3 component images,
or 4, for CMYK and other 4 component images.
That's a trivial check in the tiff2pdf.c code of five or ten or more
lines, I would be happy to change those for you and send the patch to
Andrey that he might incorporate it into the CVS version of the library,
libtiff. That would basically involve checking for the ColorMap tag
before checking for the PhotometricInterpretation tag, and then fooling
libtiff to convince it that the image has one component instead of
three, if necessary, and that the photometric interpretation is
PaletteColor instead of RGB.
http://tiki-lounge.com/~raf/tiff/fields.html
Please run the tiffinfo and tiffdump programs on the image file and send
the results to the list. It might be something completely different, in
that case the abovementioned fix would only be for images broken in that
way. Please send the output of those inspector programs to the list.
Hey I've been developing Yet Another TIFF Tag Viewer, a TIFF property
sheet shell extension for Windows, hopefully I'll have that usable
shortly or this weekend and send notice of it here to this list. I've
noticed that on Joris' web page there are still yet a few private tags
that I did not know of, see
http://www.awaresystems.be/imaging/tiff/tifftags.html .
Thank you,
Ross F.
|
|||||||