Re: associated alpha

Bob Friesenhahn <[email protected]> Sat, 5 Feb 2005 10:06:31 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
My current thinking about this problem is that when GM encounters a 
TIFF containing associated alpha, it should load the image along with 
its associated alpha channel, but then set the image matte flag to 
MagickFalse so the alpha channel is ignored.  Images with associated 
alpha appear as if they were composited on a black background when the 
alpha channel is ignored.  Without subsequent composition, the image 
will appear as expected to the user.  A warning can be issued to tell 
the user that the associated alpha channel is ignored.

Unfortunately, all TIFF images written by ImageMagick and 
GraphicsMagick over past years are mis-marked to contain associated 
alpha so they would be loaded incorrectly.

While the world of TIFF images is much larger than those written by 
IM/GM, switching to using the unassociated alpha flag and reading 
existing images differently is bound to cause problems for existing 
users.

Development ImageMagick switched over to marking files with the 
unassociated alpha flag as of yesterday.

Bob

On Thu, 3 Feb 2005, Bob Friesenhahn wrote:

> For as long as I can remember, ImageMagick (and GraphicsMagick) has been 
> tagging TIFF files with an alpha channel with the "EXTRASAMPLE_ASSOCALPHA" 
> flag.  However, associated alpha means that the image pixels are 
> premultiplied with the alpha channel. GraphicsMagick does not support 
> premultiplied alpha.  I believe this means that GraphicsMagick should be 
> tagging the alpha channel with the EXTRASAMPLE_UNASSALPHA flag instead.
>
> Does anyone disagree with this?
>
> Bob
> ======================================
> Bob Friesenhahn
> [email protected]
> http://www.simplesystems.org/users/bfriesen
>

======================================
Bob Friesenhahn
[email protected]
http://www.simplesystems.org/users/bfriesen


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl