TIFF and LibTiff Mail List Archive


2003.09.30 14:38 "[Tiff] how can i show the different TIFF tile image on the computer screen?", by Zuyuan Wang
2003.10.31 11:35 "[Tiff] Re: ask for suggestions....", by Andrey Kiselev
2003.11.03 15:23 "[Tiff] Re: ask for suggestions....", by Zuyuan Wang
2003.11.03 16:14 "[Tiff] Re: ask for suggestions....", by Andrey Kiselev

2003.11.03 15:23 "[Tiff] Re: ask for suggestions....", by Zuyuan Wang

Dear Andrey V. Kiselev,
  Thanks a lot for your mail. As to my problem, I realy not know how to

write the TIFF image with the TIFFWriteScanline. For example, I write the following code just to test whether TIFFWriteScanline can works:

   OUT_tif = TIFFOpen(OUT_filename, "w");

   TIFFSetField(OUT_tif, TIFFTAG_IMAGEWIDTH,tileWidth);   //tileWidth=256


   bufscanline_8= (uint32 *) malloc(tileWidth*3*sizeof(uint32));


           *(bufscanline_8+x)=23;  // just set the buffer to a constant

   TIFFWriteScanline(OUT_tif,bufscanline_8, row,0);


And at last, I can't open the OUT_tif file.

Would you please tell me that what't wrong with the above code? What's the data format of the TIFFWriteScanline? Is the data arrange shoulc be ' RGBRGB.....'? All data is uint32 or not?

Thanks a lot for your kind help.....

Best regards...

On Fri, Oct 31, 2003 at 11:41:05AM +0100, Zuyuan Wang wrote:

Thanks very much for your mail. Because I am a new to TIFF, there is so
many problem.... Thanks again for your kind help.

After I used the 'TIFFReadTile(IN_tif, buf_8,col,row,0,0)' to read the tile data, I used 'bufscanline_8[position]=(buf_8[(x+y*tileWidth)*3])' to read out the data,but when I print it out, they are all like '-842150451'. It shows that I make the wrong way for reading the data out. On the other hand, I tried TIFFGerR() to get the data, and later on write it into the file, but the file could not be open.

  Would you like to tell me 1)what's the format of the tile image read by
the TIFFReafTile, is it 'RGBRGBRGB....', for my image, they are

As Frank said, you should supply us with the tiffinfo report for your file before we can discuss how this file could be read.

2)How to use ' TIFFWrteScanline'? Is it possible for me to read one tile
image line by line, and write into file line by line by using '

Yes, when you will have a buffer filled with data you can write this buffer line by line.

>Tiff mailing list

Zuyuan Wang
Swiss Federal Research Institute WSL
Zuercherstr. 111, CH-8903 Birmensdorf, SWITZERLAND
Phone: +41 1 739 2691 Fax: +41 1 739 2215