AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2005.12.12 14:24 "how about the pixel order if I use TIFFReadScanline?", by Zuyuan Wang
2005.12.12 22:58 "Re: how about the pixel order if I use TIFFReadScanline?", by Bob Friesenhahn

2005.12.12 14:24 "how about the pixel order if I use TIFFReadScanline?", by Zuyuan Wang

Dear all,

I try to use the TIFFReadScanline to read the TIFF image.  What I did is:

1) use the TIFFScanline for read the image row by row
           for (row = 0; row < height; row++){
     	result = TIFFReadScanline(tif, scanline, row,0); }

2)  later on, put each line to a whole buffer RGB:
          for (i=0;i<width;i++){

	*(RGB+row*width*3+i*3)=*(scanline+i*3);
	*(RGB+row*width*3+i*3+1)=*(scanline+i*3+1);
	*(RGB+row*width*3+i*3+2)=*(scanline+i*3+2);}}

But when I open the RGB buffer pixel by pixel, it seems that it is not the 
original image( I mean top to bottom, left to right). I think that I must 
misunderstand the pixel order of the TIFFScanline, but I have no idea about 
it. Any suggestion will be appreciated.

  Regards!
  Chanchan



- - - - - -
Dr.  Zuyuan Wang
Swiss Federal Research Institute WSL
Zuercherstr. 111, CH-8903 Birmensdorf, SWITZERLAND
Phone: +41 1 739 2691   Fax: +41 1 739 2215
Email:  zuyuan.wang@wsl.ch