transparent pixel check, and image dimensions check
Posted: 2009-08-05T10:18:22-07:00
I'm pretty sure there's a way to do both of these, and the second one possibly even without imagemagick.
I'm not sure quite what the syntax is, but I want a line of code in a .bat file I'm creating, that's something like:
if [image's top-left-pixel]==transparent goto :skipTransparencyFunction
I just need the syntax on using imagemagick to return the value for an images's top-left-pixel, and check it against a transparent value, to see if it is.
The images in question are .png files, a sample here: http://i29.tinypic.com/ay264y.png
---
Also, I'm needing to check images' dimensions, and if they're above something like 2,000 pixels in either dimension, size the highest one down to 2,000 pixels. I can't seem to find a simple way to check this, in ImageMagick's documentation... and I imagine there's a way to have ImageMagick return just the width or just the height of an image, in number format, right?
I'm not sure quite what the syntax is, but I want a line of code in a .bat file I'm creating, that's something like:
if [image's top-left-pixel]==transparent goto :skipTransparencyFunction
I just need the syntax on using imagemagick to return the value for an images's top-left-pixel, and check it against a transparent value, to see if it is.
The images in question are .png files, a sample here: http://i29.tinypic.com/ay264y.png
---
Also, I'm needing to check images' dimensions, and if they're above something like 2,000 pixels in either dimension, size the highest one down to 2,000 pixels. I can't seem to find a simple way to check this, in ImageMagick's documentation... and I imagine there's a way to have ImageMagick return just the width or just the height of an image, in number format, right?