ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: sts9 on April 20, 2012, 05:33:56 AM

Title: Extract ICC Profiles embedded in EXIF
Post by: sts9 on April 20, 2012, 05:33:56 AM
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
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: Phil Harvey on April 20, 2012, 07:17:43 AM
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
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: sts9 on April 20, 2012, 08:09:17 AM
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
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: Phil Harvey on April 20, 2012, 08:15:16 AM
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
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: sts9 on April 20, 2012, 08:26:15 AM
thanks for clarify this Phil!

best,
stefan
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: sts9 on April 20, 2012, 11:23:04 AM
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
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: Phil Harvey on April 20, 2012, 11:47:56 AM
The Adobe RGB profile is indicated in a JPEG image by setting EXIF:ColorSpace to "Uncalibrated" and EXIF:InteropIndex to "R03".

- Phil
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: sts9 on April 20, 2012, 12:42:42 PM
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
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: Phil Harvey on April 20, 2012, 12:52:05 PM
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
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: sts9 on April 20, 2012, 03:26:26 PM
Hi Phil,

this sound good. Makes it easier to handle :)
thanks for your support!
best,
stefan
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: Lito on May 27, 2016, 09:58:45 AM
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>
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: Phil Harvey on May 27, 2016, 10:45:01 AM
Try this:

exiftool -profiledescription somefile.jpg

- Phil
Title: Re: Extract ICC Profiles embedded in EXIF
Post by: Lito on May 30, 2016, 05:34:23 AM
Works like a charm, thanks!!