TIFF and LibTiff Mail List Archive


2003.09.20 05:48 "[Tiff] tiff separate image planes", by Pushkar Pradhan
2003.09.20 20:07 "[Tiff] (no subject)", by Pushkar Pradhan
2003.09.22 13:55 "[Tiff] (no subject)", by Andrey Kiselev

2003.09.22 13:55 "[Tiff] (no subject)", by Andrey Kiselev

On Sat, Sep 20, 2003 at 03:07:55PM -0500, Pushkar Pradhan wrote:

I'm unable to read a RGB image (strip oriented) correctly, this is my code:

for(strip = 0; strip < TIFFNumberOfStrips(tif); strip+=3) {
      size = TIFFReadEncodedStrip(tif, strip, bufRGB, (tsize_t)-1);

size = TIFFReadEncodedStrip(tif, strip+1, bufRGB+size, (tsize_t)-1);

size = TIFFReadEncodedStrip(tif, strip+2, bufRGB+(size*2),

      printf("read %d bytes\n", size);

      size = TIFFWriteEncodedStrip(wtif, strip, bufRGB, size);


       size = TIFFWriteEncodedStrip(wtif, strip+1, bufLHS+(size),


      size = TIFFWriteEncodedStrip(wtif, strip+2, bufLHS+(size*2),


      printf("wrote %d bytes\n", size);

The img. is 512X512, rows per strip = 1 and separate image planes. I get wrong/junk values in the o/p image. Can somebody tell the mistake in my code?


Is it your intention to fill part of output image planes from the different buffer?


Andrey V. Kiselev

Home phone: +7 812 5274898 ICQ# 26871517