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

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
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.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum