How to identify format and characteristics of image file

To identify format and characteristics of image file you need to use command called identify.


It will also report if an image is incomplete or corrupt. The information displayed includes the scene 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

If you are looking to provide scripting solution to automate task then this command is the best one.

$ identify -verbose snap-S25-20060218-235000-1.ppm | less


Image: snap-S25-20060218-235000-1.ppm
Format: PNM (Portable anymap)
Geometry: 768x576
Class: DirectClass
Colorspace: RGB
Type: TrueColor
Depth: 8 bits
Endianess: Undefined
Channel depth:
  Red: 8-bits
  Green: 8-bits
  Blue: 8-bits
Channel statistics:
    Min: 0
    Max: 255
    Mean: 87.5478
    Standard deviation: 89.9707
    Min: 0
    Max: 255
    Mean: 73.0576
    Standard deviation: 84.7219
    Min: 0
    Max: 255
    Mean: 53.6681
    Standard deviation: 73.7701
Colors: 163423                                        
Rendering-intent: Undefined
Resolution: 72x72
Units: Undefined
Filesize: 1.3mb
Interlace: None
Background Color: grey100
Border Color: #DFDFDF
Matte Color: grey74
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: Undefined
signature: ad1ac5b547203e393117aab
Tainted: False
User Time: 0.020u
Elapsed Time: 0:01

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

1 comment… add one
  • Eli Skoczylas May 21, 2012 @ 15:29

    The identify command is part of the ImageMagick software package.
    If you don’t have it installed on your system, you won’t be able to run identify….

    Directions to install ImageMagick are available at

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.