Page 1 of 1

Re: can I check if an image is transparent??

Posted: 2008-07-09T18:52:16-07:00
by anthony
Sorry for the slow delay.

Code: Select all

identify -verbose image
Look for statistics, alpha, and if the maximin is not zero there is at least some semi-transparency.

Alternative extract the alpha channel...

Code: Select all

convert image -matte -channel A -separate -format '%[fx:image.maxima]' info: 
If 0 it is fully-opaque, it is 1, image has full transparent,
a value between only some semi-transparency (translucent)