2004.08.20 08:25 "[Tiff] Tiff conversion using libtiff", by Ross A. Finlayson
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:
Later, it has
"No support for RGB image %s wit h %u samples per pixel",
t2p->t2p_error = T2P_ERR_ERROR;
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.
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.