Fred's ImageMagick Tidbits


 



ImageMagick Information



IM Version Information

identify -version

Version: ImageMagick 6.4.3 2008-08-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

top



Is IM Installed

[ "$(identify -version)" != "" ] && echo "$(identify -version)" || echo "not installed"

Version: ImageMagick 6.4.3 2008-08-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

top



IM Version Number With Minor Release

convert -list configure | sed -n 's/^LIB_VERSION_NUMBER \([,0-9]*\)$/\1/p' | tr "," "."

or

convert -list configure | grep 'LIB_VERSION_NUMBER' | cut -d\   -f2 | tr "," "."

(note: requires two spaces between -d\ and -f2)

6.4.3.5

See Anthony's alternate approach that is useful for extracting the version number for use in scripts. It allows one to switch between two different cases based upon the 4-digit version number expressed with leading zeros rather than periods, for example, as 06040204.



Does Your IM Version Support A Given Command

List All Commands

convert -list command

+adjoin
-adjoin
-adaptive-sharpen
+adaptive-sharpen
-adaptive-threshold
+adaptive-threshold
+affine
-affine
+affinity
-affinity
+alpha
-alpha
+annotate
-annotate
...

Search For Specific Command

command="distort"
echo "FOUND=`convert -list command | grep "$command" | tr "\n" " "`"

FOUND=+distort -distort

List All Command Options

(limited to certain commands -- see convert -list list)

command="distort"
convert -list "$command"

Affine
AffineProjection
ScaleRotateTranslate
SRT
Perspective
PerspectiveProjection
Bilinear
Arc
Polar
DePolar
Barrel
BarrelInverse
Shepards

top



IM QuantumDepth

convert xc: -format "%q" info:

16

top



IM QuantumRange

convert xc: -format "%[fx:quantumrange]" info:

65535

top



Compiled Delegate Libraries
(see repository)

convert -list configure | sed -n 's/^\(DELEGATES.*\)$/\1/p'

or

convert -list configure | grep 'DELEGATES'

DELEGATES bzlib fontconfig freetype gs jpeg jp2 lcms lqr openexr png tiff x11 xml zlib

top