I have PNG image files on Mac OS X. How can I find out if an image is 24 bit color or 32 bit color?
feedback
|
|
pngcheck will give a succinct description (and any errors, should they exist): $ pngcheck *.png OK: sample24.png (128x128, 24-bit RGB, non-interlaced, 89.7%). OK: sample32.png (128x128, 32-bit RGB+alpha, non-interlaced, 78.0%). No errors were detected in 2 of the 2 files tested. Mac binaries available on supplied link. | |||
|
feedback
|
|
Mac OS X also comes with a utility built into it called sips that could be used to query and manipulate different attributes of image files. As an example, you could use the following command to display all image properties associated with the image:
| |||||||||||||||
feedback
|
|
ImageMagick's identify -verbose <image file> If your image is 24 bit you will see: Channel depth: red: 8-bit green: 8-bit blue: 8-bit If your PNG image is 32 bit you will see: Channel depth: red: 8-bit green: 8-bit blue: 8-bit alpha: 8-bit There will be a lot of other information displayed as well. | |||
|
feedback
|
|
In addition to what has been suggested, Mac OS X comes with a utility built into it called sips that could be used to query and manipulate different attributes of image files. As an example, you could use the following command to display all image properties associated with the image:
| ||||
|
feedback
|
|
You can query Spotlight's metadata index using
The results seem a bit odd though. | ||||
|
feedback
|