2004.10.20 18:40 "[Tiff] the BitsPerSymbol tag", by Sachin Garg

2004.10.21 13:14 "Re: [Tiff] the BitsPerSymbol tag", by Frank Warmerdam

But I was just wondering if there is some way for my program to gracefully exit, instead of dying with a memory-crash etc... One option I can think of is a warning/error when reading the BitsPerSample if its found to be different for different samples.

I think it will be better if it is added in libtiff, instead of me adding it in my copy.


TIFFOpen() should fail issuing a message via normal TIFF error mechanisms. The call looks like:

        TIFFError(tif->tif_name, "Cannot handle different per-sample values for field \"%s\"", _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);

You should be able to catch this the way you would catch any other TIFF error.

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent