Even Rouault <[email protected]> wrote: > There will be likely a compatibility problem if we do this, because > GDAL up to now writes TIFF RGBA images with EXTRASAMPLE_ASSOCALPHA > (pre-multiplied), but I think in most cases the data that people have > feed in the GTiff driver was not pre-multiplied. So if we un-premultiply > this would cause issues in case the alpha value is not 0 or 255.
You only need to deal with altering the raw data on reading if the GTiff driver were changed to always write unassociated alphas. Also, if people have been writing non-pre-multipled samples to associated-alpha files in the existing interface, then the TIFF data is damaged in any case. > The temporary conclusion of that is that there are likely images in > the wild where the value of the flag does not reflect the reality > of the imagery values... But, GDAL should likely be fixed to set > EXTRASAMPLE_UNASSALPHA to better reflect the way it is generally used > (presumably). There's not much you can do about damaged images in the wild. However, we can try to prevent more from being created. --------------------------+----------------------+-------------------------- Dr. Craig S. Bruce | Ph 819-771-8303 x205 | CubeWerx Inc. Senior Software Developer | Fax 819-771-8388 | Gatineau, Québec, Canada [email protected] | http://csbruce.com/ | http://www.cubewerx.com/ --------------------------+----------------------+-------------------------- "I don't have to take this abuse from you -- I've got hundreds of people waiting to abuse me!" --Bill Murray, "Ghostbusters" _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
