AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.07.30 21:53 "[Tiff] writing tiles to tiff file", by Pushkar Pradhan
2003.08.01 20:02 "[Tiff] problems using tiffwritetile", by Pushkar Pradhan
2003.08.03 01:52 "[Tiff] problems using tiffwritetile", by Frank Warmerdam
2003.08.03 02:41 "[Tiff] problems using tiffwritetile", by Pushkar Pradhan
2003.08.04 02:57 "[Tiff] Configure ZIP, JPEG, PIXARLOG", by Robin Rowe
2003.08.04 05:14 "[Tiff] Configure ZIP, JPEG, PIXARLOG", by Andrey Kiselev
2003.08.04 16:16 "[Tiff] Configure ZIP, JPEG, PIXARLOG", by Frank Warmerdam
2003.09.12 16:04 "[Tiff] writing out custom tags", by Chris Padwick
2003.09.15 07:45 "[Tiff] writing out custom tags", by Andrey Kiselev
2003.09.18 09:53 "[Tiff] color changes only with Windows Imaging (again)", by Takuya SATO
2003.09.18 12:26 "[Tiff] color changes only with Windows Imaging (again)", by Frank Warmerdam
2003.09.17 22:14 "[Tiff] is image tiled or striped?", by Pushkar Pradhan
2003.09.17 22:39 "[Tiff] is image tiled or striped?", by Frank Warmerdam

2003.08.01 20:02 "[Tiff] problems using tiffwritetile", by Pushkar Pradhan

I'm not able to write a tiled tiff file. The problem is TIFFWriteTile is not writing the amount of data being read by TIFFReadTile TIFFReadTile reads in 16384 bytes but TIFFWriteTile writes out only 2048 bytes.

Can anyone tell what's going wrong? (it's a single band img. and I set the tags also).

Code:
    for(y = 0; y < imageLength; y += tileLength) {

   for(x = 0; x < imageWidth; x += tileWidth) {

        size = TIFFReadTile(tif, buf, x, y, 0, 0);

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

        count++;
        printf("tile: %d\n", count);

/* RGBTOLHS */

        /*Rgb2Lhs(&bufR, &bufG, &bufB, &L, &H, &S, tileLength, tileWidth);*/

        size = TIFFWriteTile(wtif, buf, x, y, 0, 0);

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

     printf("width %d bytes\n", x);

        printf("length %d bytes\n", y }
    }

Pushkar Pradhan