AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.04.13 14:17 "[Tiff] program to read, write and manipulate .tif images", by Chakra Pani
2005.04.13 14:34 "Re: [Tiff] program to read, write and manipulate .tif images", by Joris Van Damme
2005.04.18 05:55 "[Tiff] program to read, write and manipulate .tif images", by Priyanshu Sharma

2005.04.18 05:55 "[Tiff] program to read, write and manipulate .tif images", by Priyanshu Sharma

Hi chakri,

I have written this simple code in C.. it works for windows.. i feel it will work on unix also.. u just have to build the library properly in unix.

the logic is very simple.. just check it out..

fp_TIFF_read    =       TIFFOpen(src, "r");
if (fp_TIFF_read != NULL)
        {
                char path[1024+1];
                newfilename();
                strcpy(path, fname);
                strcat(path, ".tif");
                fp_TIFF_write = TIFFOpen(dest,"w");
                if (fp_TIFF_write == NULL)
                        return false;
                if (!tiffcp(fp_TIFF_read, fp_TIFF_write))
                        return false;
                TIFFClose(fp_TIFF_write);
        (void) TIFFClose(fp_TIFF_read);
        }

I have made use of some of the functions that are already in the LIBTIFF library..

just try out

If u don't want to use the library then also i can give u the logic using which u can read/ write and manupulate the tiff images.

Regards
Priyanshu
BITS, Pilani