ImageMagick Identify Command-line Tool
- +The identify program describes the format and characteristics of one or more image files. It also reports if an image is incomplete or corrupt. The information returned includes the image number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image. Many more attributes are available with the verbose option. See Command Line Processing for advice on how to structure your identify command or see below for example usages of the command.
+The identify program describes the format and characteristics of one or more image files. It also reports if an image is incomplete or corrupt. The information returned includes the image number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image. Many more attributes are available with the verbose option. See Command Line Processing for advice on how to structure your identify command or see below for example usages of the command.
Example Usage
@@ -225,10 +250,10 @@We list a few examples of the identify command here to illustrate its usefulness and ease of use. To get started, lets identify an image in the JPEG format:
-$magick> identify rose.jpg rose.jpg JPEG 640x480 DirectClass 87kb 0.050u 0:01
+$ identify rose.jpg rose.jpg JPEG 640x480 DirectClass 87kb 0.050u 0:01
Next, we look at the same image in greater detail:
- $magick> identify -verbose rose.jpgImage: rose.jpg $ identify -verbose rose.jpgImage: rose.jpg
+
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 70x46+0+0
@@ -282,16 +307,16 @@
Tainted: False
Filesize: 3.97266kb
Number pixels: 3.14453kb
- Version: ImageMagick 6.7.1-0 2011-07-01 Q16 http://www.imagemagick.org
To get the print size in inches of an image at 72 DPI, use:
-$magick> identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png8.5 x 11 inches
+$ identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png8.5 x 11 inches
The depth and dimensions of a raw image must be specified on the command line:
-$magick> identify -depth 8 -size 640x480 image.rawimage.raw RGB 640x480 DirectClass 9kb 0.000u 0:01
+$ identify -depth 8 -size 640x480 image.rawimage.raw RGB 640x480 DirectClass 9kb 0.000u 0:01
Here we display the image texture features and the number of unique colors in the image:
-$magick> identify -verbose -features 1 -unique image.png
+$ identify -verbose -features 1 -unique image.png
You can find additional examples of using identify in Examples of ImageMagick Usage.