Clear Filters
Clear Filters

How can I embed an ICC color profile in a JPEG file?

12 views (last 30 days)
Matlab (R2020a) offers no native option to embed ICC color profiles in JPEG files. How can I do it?

Accepted Answer

Vlad Atanasiu
Vlad Atanasiu on 17 Jul 2020
Here is how to embed an ICC color profile in JPEG file.
Step 1. Download Phil Harvey's ExifTool from for PC the "Windows Executable" and for Mac the Perl library.
Step 2. Change the ExifTool name: for PC from exiftool(-k).exe to exiftool.exe and for Mac from exiftool to
Step 3. Locate the ICC color profiles on your hard disk. The file names of some of the most common profiles are sRGB Profile.icc and AdobeRGB1998.icc.
Step 4. Execute the code below, in which you adapt the paths of your image, ExifTool and ICC profile files.
Note: If you wish to embed an ICC color profile in a TIFF file, follow Steve Eddins's advices at
% Image file location (change as needed).
image_url = fullfile('image_path','image.jpg');
% ICC color profile file location (change as needed).
icc_url = fullfile('icc_profiles_path','icc_profile.icc');
% ExifTool file location (change as needed).
if ispc
exiftool_url = fullfile('exiftool_path','exiftool.exe');
exiftool_url = fullfile('exiftool_path','');
% Copy ICC color profile from ICC definition file into image file.
icc_embed_status = system(...
[ '"', exiftool_url, ...
'" -q -tagsFromFile "', ...
icc_url, '" -ICC_Profile "', ...
image_url,'"' ]);
% Delete image backup file produced by exiftool.
if icc_embed_status == 0
icc_status = 'No ICC color profiles embeded in JPEG files.';

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!