Extract ICC Profiles embedded in EXIF

Started by sts9, April 20, 2012, 05:33:56 AM

Previous topic - Next topic

sts9

Hi All,

as far as i understand it is possible to find icc profiles embedded within the exif matatag and also icc profiles attached "normal" to JPEG.

if i use
exittool -b -w icc somefile.jpg
i got the icc profile whatever it is "normal" attached or embedded within exif data???

i need to profile JPG with imagemagick and for this task i need to catch input icc profiles.
imagemagick only can use the attached profiles at the moment, i think.

also i like to find sample jpeg with embedded exif icc profiles.

thanks for any help with this!
best
stefan

Phil Harvey

Hi stefan,

I'm not exactly sure what you are asking.  The command to extract an existing ICC profile from an image is:

exiftool -icc_profile -b -w icc somefile.jpg    (you forgot the -icc_profile in your command)

To embed an ICC profile, do this:

exiftool "-icc_profile<=somefile.icc" a.jpg

For some sample files containing ICC profiles, you could look at the test images in the t/images directory of the full ExifTool distribution.  The following files contain ICC profiles:

t/images/ExifTool.jpg
t/images/ExifTool.tif
t/images/GIF.gif
t/images/GIMP.xcf
t/images/Nikon.nef
t/images/Photoshop.psd
t/images/XMP.jpg

- 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 ($).

sts9

Hi Phil,
thanks for your fast answer and sorry for my mistake with parameter.
It works fine!

But i'm not sure about this embedded icc profiles within EXIF data.

Is it right or not that a icc profile can included in two ways within a JPG?
One way within the exif data and another way "just" attached?
Or, if a icc profile is included, it is always within the exif data and so the command extract the profile always correct?

The other way cameras doing profiles without including into the JPG is just to point out into Profile Description Tag, right?

Sorry for my bad english explanation ^^

best,
stefan

Phil Harvey

Hi Stefan,

There is one correct technique for embedding the ICC profile in JPEG images, and a different technique for TIFF images.  Some software may incorrectly use the TIFF technique in JPEG images, but that is wrong.  ExifTool will read either, but when creating a new profile it only puts it in the correct location.

- 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 ($).

sts9

thanks for clarify this Phil!

best,
stefan

sts9

it is me again :)

can someone post a "typical" camera JPG image that have NO profile included BUT a "Adobe RGB (1998)" or "ProPhoto" profile within the exif data declared.


thank
stefan

Phil Harvey

The Adobe RGB profile is indicated in a JPEG image by setting EXIF:ColorSpace to "Uncalibrated" and EXIF:InteropIndex to "R03".

- 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 ($).

sts9

hmm ... ok
now we have the Adobe and sRGB case.
What about all other profiles? Or in practice only this two profile are relevant within exif?

best,
stefan

Phil Harvey

Hi Stefan,

The EXIF specification only really specifies the sRGB profile.  Any other profiles are "Uncalibrated".  It is the DCF specification that extends this for Adobe RGB.  This is called a DCF "optional" file.  DCF specifies only "basic" (sRGB) and "optional" (Adobe RGB) file types.  Any other color profiles must be specified using an embedded 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 ($).

sts9

Hi Phil,

this sound good. Makes it easier to handle :)
thanks for your support!
best,
stefan

Lito

The command exiftool -icc_profile -b -w icc somefile.jpg gives me way to much information, is it possible to read only the information in the field  photoshop:ICCProfile?

Example from Photoshop:  <photoshop:ICCProfile>Adobe RGB (1998)</photoshop:ICCProfile>

Phil Harvey

Try this:

exiftool -profiledescription somefile.jpg

- 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 ($).

Lito