Get ColorMode

Started by ame, December 18, 2013, 05:57:17 AM

Previous topic - Next topic

ame

Hi,

I would like to extract the Color Space (color Mode) from Images.
I would like to get it "like" when in Photoshop you open an image and look the color mode (Bitmap, Grayscale, RGB, CMYK...)
This info is written in some metadata (exif, ipct...) or can I get this info even if the file has no metadata so in "absolute" mode?

Ame

Phil Harvey

Hi Ame,

What type of images are you talking about?  JPEG, TIFF, PNG, RAW... ?  They all store this information differently.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ame

Hi Phil,

Virtually any image but I can restrict to JPEG, TIFF and PSD Files.

Ame

Phil Harvey

Hi Ame,

JPEG files are usually 8 bits per sample and the color space is defined by ColorSpace and InteropIndex, but they may contain an ICC_Profile.  TIFF files are similar, but BitsPerSample gives the bit depth of the individual colour planes and is usually 8 or 16 (x 3 for RGB).  PSD files store ColorMode and BitDepth information, and may also contain an ICC_Profile.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ame

Hi Phil,

Yes I know. I know very well the color modes and color profiles.
My question was if exist a command in exiftool to extract these info (bitmap, grayscale, duotone, indexed colors, RGB, CMYK, Lab and multichannel) even written with different labels from images using your tool.
I need to use with some image -Colorspace and with some other -ColorMode?

Ame

Phil Harvey

Hi Ame,

I don't think that ExifTool summarizes color space information in the way you want.  It just extracts the metadata that exists in each image.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).