Main Content


Write ICC color profile data



outProfile = iccwrite(inProfile,filename) writes an International Color Consortium (ICC) profile data in structure inProfile to the file specified by filename.

You can use this function to modify fields in an ICC profile data structure and write it to a file with name filename. For example, some applications use the string field in profile description to present choices to users. The ICC recommends modifying the profile description in ICC profile data before writing the data to a file. Each profile is recommended to have a unique profile description. You can therefore, use the iccwrite function to modify the profile description.


iccwrite can write profiles that conform with either Version 2 (ICC.1:2001-04) or Version 4 (ICC.1:2001-12) of the ICC specification. To determine the version of the ICC specification, use version field in the Header of profile data structure. Based on the version, format the inProfile for output. For more information about ICC profiles, visit the ICC website,


collapse all

Read an ICC profile data into the workspace and display the profile name.

inProfile = iccread('monitor.icm');
ans = 

Change the profile name to 'monitor_RGB'.

inProfile.Description.String = 'monitor_RGB';

Write the updated ICC profile data to a new file and display the corresponding output ICC profile data. The new file is created in the current working folder.

outProfile = iccwrite(inProfile,'monitorcolor.icm')
outProfile = struct with fields:
             Header: [1x1 struct]
           TagTable: {11x3 cell}
        Description: [1x1 struct]
    MediaWhitePoint: [0.9642 1.0000 0.8249]
          Copyright: 'Copyright  Sequel Imaging Inc. 1996-2001'
    MediaBlackPoint: [0 0 0]
             MatTRC: [1x1 struct]
        PrivateTags: {'vcgt'  [1x786 uint8]}
           Filename: 'monitorcolor.icm'

Verify the modified description in output ICC profile data.

ans = 

Input Arguments

collapse all

Input ICC profile data, specified as a structure array represents an ICC profile in the data format returned by iccread. The ICC profile data must contain all the tags and fields required by the ICC profile specification. The input ICC profile data is written to filename.

Data Types: struct

Name of the file to write ICC profile data, specified as a character vector or string scalar. Depending on the operating system, you can save the file with an extension .icc or .icm.


If you specify only the file name without its path, iccwrite writes the file to current working folder.

Data Types: char | string

Output Arguments

collapse all

Output ICC profile data, returned as a structure array gives the ICC profile data written to the file filename.

Data Types: struct


iccwrite does not perform automatic conversions from one version of the ICC specification to another. Do the conversion manually by adding fields or modifying fields in ICC profile data. Use isicc to validate the converted ICC profile data.

Version History

Introduced before R2006a