« Return to Thread: Checking if image is transparent

Re: Checking if image is transparent

by Bob Friesenhahn :: Rate this Message:

Reply to Author | View in Thread

On Mon, 31 Mar 2008, zaske wrote:
> Or to put my question in other words -
> I loaded an image into MagickIMage object. How can I determine if this image
> has a color that is defined as transparent?

Check to see if the "matte" attribute flag is set.  This flag enables
use of transparency ("opacity") at all.  However, even if it is set,
it is possible that there are no pixels with transparency.  The only
way to know for sure is to test all of the pixels.

Bob
======================================
Bob Friesenhahn
bfriesen@..., http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

_______________________________________________
JMagick mailing list
JMagick@...
http://www.yeo.id.au/mailman/listinfo/jmagick
Please ensure that JMagick@... is a recipient when replying.

 « Return to Thread: Checking if image is transparent