2006.01.03 13:01 "[Tiff] read all uncompressed tiff data", by Rocky Pulley

2006.01.03 18:23 "Re: [Tiff] read all uncompressed tiff data", by Rocky Pulley

Thanks for the info on this. I'm trying this idea of not uncompressing the data. It seems to work but the image is inverted. Is there some property that you know of to set in the PDF for showing that this field is reversed? When I try b&w images with the tiff2pdf application, it always converts them to fax compression, so if I put an lzw one through, I can't see what properties it should show it since it converts it instead. I tried some flags that are supposed to make it not compress but it still does this.

Joris <joris.at.lebbeke@skynet.be> wrote: Rocky Pulley wrote:

I'm writing a PDF converter and I need to get the TIFF data in one uncompressed chunk to put in the file. Is it possible to somehow say:

unsigned char *data;
int size;

TIFFGetImageData(myTiff, &data, &size);

PDF supports most compression modes that TIFF does. Thus, doing a TIFF to PDF conversion, it is customary to not even decompress, but to snoop the compressed image data from the TIFF and directly dump that into the PDF. For lossy compression, like JPEG, that's not just a performance issue, but also a size and quality issue.

For this purpose, you can use the TIFFReadRaw interface after reading/detecting configuration from tags:



I am hoping that I don't have to do anything based on the RGB info or compression level, I'm just wanting some way to get the image data of the tiff. I will need to use this metadata when writing info about the image to the file, but I'm sort of hoping that I can just get the image data in an easy call.

You seem to be asking for the RGBA interface.


But consider what I wrote above. Also, there's a tiff2pdf contribution in the LibTiff distribution that you may find helpful.

Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping