AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

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.20 05:48 "[Tiff] tiff separate image planes", by Pushkar Pradhan

Can somebody explain to me how TIFF images are organized if it is a separate image plane.

I have a RGB image - 512X512.

So if this was separate image plane would it be organized like this: RowsperStrip = 1

RRRRRRRRRRRRRRRRRR (1st strip)
GGGGGGGGGGGGGGGGGG (1st strip)
BBBBBBBBBBBBBBBBBB (1st strip)
RRRRRRRRRRRRRRRRRR (2nd strip)
GGGGGGGGGGGGGGGGGG (2nd strip)
BBBBBBBBBBBBBBBBBB (2nd strip)
.....

If it is then is my logic to read all strips correct?

    for(strip = 0; strip < TIFFNumberOfStrips(tif); strip+=3) {
      size = TIFFReadEncodedStrip(tif, strip, bufRGB, (tsize_t)-1);
/* R data */
      size = TIFFReadEncodedStrip(tif, strip+1, bufRGB+size, (tsize_t)-1);
/* G data */
      size = TIFFReadEncodedStrip(tif, strip+2, bufRGB+(size*2),
(tsize_t)-1); /* B data */

 or is image organized like this:

RRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRR
... (all R data)
GGGGGGGGGGGGGGGGGGGG
GGGGGGGGGGGGGGGGGGGG
... (all G data)
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
... (all B data)

My o/p image is not correct so I need to know this.

Pushkar Pradhan