| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2004.07.12 09:01 "Re: sampleper pixel", by Balint Radics> Balint,
>
> If the file has one sample per pixel and is of type float (4 bytes
> per pixel, sampleformat ieeefloat) then you would do something like this:
>
> buf = _TIFFmalloc(TIFFScanlineSize(Tif));
> for (int row = 0; row < ImageHeight; row++){
> TIFFReadScanline(Tif, buf, row);
> "reading the buff somehow";
> for( int pixel = 0; pixel < ImageWidth; pixel++ ) {
> printf( "value[%d,%d] = %f\n",
> pixel, row, ((float *) buf)[pixel] );
> }
> }
>
Thanx,but what due to my inspect the TIFFTAG_SAMPLESPERPIXEL tag sais
that my file has 1076232193 samplesperpixel.What does that mean???
Just to be correct:
int samplesperpixel;
TIFFGetField(Tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
cout << samplesperpixel << endl;
was the code.
Balint
|
|||||||