2005.04.01 09:49 "Re: [Tiff] TIFFOpen alternative", by Joris
- I have a big data buffer where the whole file is stored. What API can I call to parse the buffer to get the header and the image data? What do I have to initialize/set beforehand?
You will need to look at TIFFClientOpen. See http://www.remotesensing.org/libtiff/man/TIFFOpen.3tiff.html, and perhaps http://www.asmail.be/msg0055436713.html and subsequent mails in that thread. Essentially, TIFFClientOpen takes pointers to IO callbacks, that you can implement yourself to do any sort of IO, including reading from a buffer of yours.
- After I already have the data I need, I plan to call the API TIFFReadRGBAImage. It will return to me a big buffer with the whole image in RGBA format... Is this a correct operation?
It is one possibility. For a more advanced, lower level interface, see http://www.remotesensing.org/libtiff/libtiff.html#Scanlines and subsequent topics on that page.
Can you also give me information on compression operations? Which one is the best to use?
That's a FAQ question. See http://www.awaresystems.be/imaging/tiff/faq.html#q10.
Joris Van Damme
Download your free TIFF tag viewer for windows here: