#10: How can I tell if a PNG has transparency?
Solved!
I have a PNG, and I want to know if the background (or any regions) are transparent.
Use the command-line tools from ImageMagick
- ivan on April 15, 2009, 06:18 PM UTC
If you have the ImageMagick package installed (available for UNIX/MacOSX/Windows), the 'identify' command-line tool can dump information on a given file if it's of a format supported by ImageMagick.
To dump transparency information about a file use the following command:
"identify -format %A <filename>"
This will return a simple "True" or "False" depending on whether the image has a transparency layer or not.
To dump transparency information about a file use the following command:
"identify -format %A <filename>"
This will return a simple "True" or "False" depending on whether the image has a transparency layer or not.
Think you've got a better solution? Help kevin out by posting your solution
More image properties
http://www.imagemagick.org/script/escape.php - found by ivan on April 15, 2009, 06:20 PM UTC
List of properties that 'identify' can dump from an image.
ImageMagick's 'identify' command
http://www.imagemagick.org/Usage/basics/#identify - found by ivan on April 15, 2009, 06:19 PM UTC
ImageMagick's 'identify' command-line basics.