TIFF and LibTiff Mail List Archive

2009.06.30 14:20 "[Tiff] How to parse private ifd tags!", by Ercan Yalvac


I am a newbee about tiff parsing. I need to parse a tiff image which has a private ifd directory (non image) and private tags in it. I couldnt figure out how to do it with libtiff 3.6.1. Below is the source I have tried. TIFFSetSubDirectory gives error. The message says the directory is not valid since there is no imagelength. Actually this directory is not an image directory anyway. I just want to parse the ASCII data that the vendor of the image has put there.

         toff_t tiff_ifd_offset;
        // get the offset to the directory
        if (! TIFFGetField(tif, PRIVATE_TAG,
            &tiff_ifd_offset) ) {
                printf("Couldn't find the private IFD Offset);
                return -2;

            if (!TIFFSetSubDirectory(tif,tiff_ifd_offset)){
                printf("Couldn't set the directory.");
                //return -2;

            char *sValue;
            var2 = TIFFGetField(tif, PRIVATE_TAG_DESCRIPTION, sValue);

Other question is I have seen some source code about this parsing but its in Libtiff Ver 3.8.3. I couldnt find the download of this version. I need to compile the library in VS 2003. Where can I find this download?

I really appreciate any help,




Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!