nanos
December 21st, 2003, 11:28 PM
my attempts to read and write tiff files are failing. i use libtiff.
any solid exmaples of reading and writing tiff files?. i am more interested in reading. c , c++, ...
vicky_vigia
December 24th, 2003, 11:55 PM
Start reading the image Tag-by-Tag:
TIFFGetField (inImg, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField (inImg, TIFFTAG_IMAGELENGTH, &height);
TIFFGetFieldDefaulted (inImg, TIFFTAG_BITSPERSAMPLE, &bps);
....
....
Allocate memory for Image to be read by strips and to be stored in RGB arrays, with constraints like:
TIFFTAG_BITSPERSAMPLE
TIFFTAG_PLANARCONFIG
TIFFTAG_PHOTOMETRIC
...
Moreover checkout tiff doco for detailed explaination with sample code.