I want to get colormode (bitmap, gray, rgb, cmyk) of image files (jpg, tif). Imagemagick calls it "colorspace", while exiftool "colormode" and Photoshop "image mode".
One possibility is identify, which gives nearly always the desired result, but it is painfully slow. Identify has also a problem, it identifies monochrome images (Bitmap) as Gray.
// Version: ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP http://www.imagemagick.org time identify -quiet -ping -format "%[colorspace] %f\n" *.jpg *.tif real 0m9.479s user 0m1.202s sys 0m8.232s
exiftool is faster (and detects monochromes as "Bitmap" which is correct), but does not always give the colorspace at all:
//ExifTool Version Number : 9.24 time exiftool -S -ColorMode *.jpg *.tif real 0m1.178s user 0m1.098s sys 0m0.071s
Is it possible to get always the colormode using exiftool, or some other fast way?