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 2006

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

2006.01.03 13:01 "read all uncompressed tiff data", by Rocky Pulley
2006.01.03 17:12 "Re: read all uncompressed tiff data", by Joris Van Damme
2006.01.03 18:23 "Re: read all uncompressed tiff data", by Rocky Pulley
2006.01.03 18:51 "Re: read all uncompressed tiff data", by Joris Van Damme
2006.01.03 19:08 "Re: read all uncompressed tiff data", by Rocky Pulley
2006.01.04 09:25 "Re: read all uncompressed tiff data", by Gerben Vos
2006.01.04 11:22 "Re: read all uncompressed tiff data", by Rocky Pulley

2006.01.03 17:12 "Re: read all uncompressed tiff data", by Joris Van Damme

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:

http://www.remotesensing.org/libtiff/man/TIFFReadRawStrip.3tiff.html
http://www.remotesensing.org/libtiff/man/TIFFReadRawTile.3tiff.html

> 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.

http://www.remotesensing.org/libtiff/libtiff.html#tiffrgbaimage


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


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