1998.09.21 01:41 "TIFFReadRGBAImage (cont)", by Michael S. Harrison

1998.09.21 01:41 "TIFFReadRGBAImage (cont)", by Michael S. Harrison

this is quite likely a shameless hack, but I found that if I add the following code to TIFFRGBAImageBegin, just after the call to get the extrasamples, my alpha files are read in and parsed correctly.

        if ( img->samplesperpixel == 4 && img->alpha == 0 )
                img->alpha = EXTRASAMPLE_UNASSALPHA;

I've run into a problem with TIFFReadRGBAImage where I am trying to load an image with alpha information (TIFFTAG_SAMPLESPERPIXEL == 4) and it's returning a buffer that has no alpha information.

I've traced it as far as the point where it tries to set the img->alpha member using TIFFTAG_EXTRASAMPLES data and that call appears to indicate that there's no alpha data (although there is). As a result, pickTileContigCase is calling putRGBcontig8bittile rather than putRGBUAcontig8bittile or putRGBAAcontig8bittile.

The file was created with Photoshop for Windows and is read properly by both PaintShop and Picture Publisher.

Any help with this problem would be greatly appreciated.

(btw, I'm using 3.4 Beta 37 of the tiff library)

  Michael S. Harrison
  Dragon's Eye Software

* Custom & Commercial Windows Development
* From Animation to System Tools
* http://www.dragonseye.com