AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.11.16 22:37 "[Tiff] reading Affymetrix tiff images", by sridhar duggireddy
[...]
2003.12.30 00:47 "RE: [Tiff] problems with custom TIFF", by Pushkar Pradhan
2003.12.30 01:09 "Re: [Tiff] problems with custom TIFF", by Joris
2003.12.31 11:40 "Re: [Tiff] problems with custom TIFF", by Andrey Kiselev
2004.01.01 23:11 "RE: [Tiff] problems with custom TIFF", by Pushkar Pradhan
[...]

2003.12.31 11:40 "Re: [Tiff] problems with custom TIFF", by Andrey Kiselev

On Mon, Dec 29, 2003 at 06:47:57PM -0600, Pushkar Pradhan wrote:

> size = TIFFReadEncodedStrip(tif, strip, bufRGB, (tsize_t)-1);

> Why do you using -1 here? It should be a size of bufRGB in bytes.

I read the libtiff tutorial which suggests using (tsize_t)-1) as it will read in the whole tile/strip by default. It seems to work okay for me.

Oh, it seems to be missed in the manual pages... Fixed.

I'm now writing out the extrasamples tag but still IMAGINE can't open the file for viewing.

This is how I get/set in the tags is this correct?

 TIFFGetField(tif, TIFFTAG_EXTRASAMPLES, &tags->extra, &tags->extraTypes);
 TIFFSetField(wtif, TIFFTAG_EXTRASAMPLES, wtags.extra, wtags.extraTypes);

Where tag members are:
  uint16 extra;
  uint16 *extraTypes;

I think you don't need to do something with extrasamples in output image. But don't forget to set TIFFTAG_SAMPLEFORMAT correctly:

 TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);

Andrey

--
Andrey V. Kiselev

Home phone: +7 812 5274898 ICQ# 26871517