[gdal-dev] Support for the premultiplied alpha channels

Tamas Szekeres szekerest at gmail.com
Sun Mar 16 16:14:25 EDT 2008


Frank,

I really got confused because of this :-((  It seems the the various
formats use different alpha representations by default. In this regard
I really don't know how to take care of this in an application without
having to consider the format actually used.
For example tiff uses pre-multiplied alpha by default (related to
EXTRASAMPLE_ASSOCALPHA = 1), but however, other formats like png uses
non premultiplied by default (AFAIK). Because of this reason the upper
level application won't really know which relationship to be used when
combining these images.
This is not an issue for GDAL itself but a significant problem for the
upper level applications. The drivers should at least denote which
alpha representation is actually used.


Best regards,

Tamas




2008/3/16, Frank Warmerdam <warmerdam at pobox.com>:
> Tamas Szekeres wrote:
>  > Folks,
>  >
>  > Do we have any support to use bitmaps with premultiplied alpha
>  > channels? I think there are some raster formats that can convey these
>  > types of images and the viewers can take care of this option.
>  >
>  > The only thing I'd like to see is to be able to determine if the image
>  > actually uses premultiplied alpha regardless of whether the drivers
>  > actually support this or not at the moment.
>  >
>  > But currently I don't see which is the right place to denote this
>  > option. I consider this is a dataset wide property rather that
>  > attached to a single band.
>
>
> Tamas,
>
>  There is no GDAL way of expressing whether image bands are premultipled
>  with alpha (unfortunately).
>
>  Best regards,
>
> --
>  ---------------------------------------+--------------------------------------
>  I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
>  light and sound - activate the windows | http://pobox.com/~warmerdam
>  and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>
>


More information about the gdal-dev mailing list