Main Content

isicc

Check for valid ICC profile data

Description

example

tf= isicc(profile)checks if the input profile is a valid International Color Consortium (ICC) profile data. The function returns a logical value that indicates if the input is a valid ICC profile.

Examples

collapse all

Read in an ICC profile data into the workspace.

profile = iccread('sRGB.icm');

Check ifprofileis a valid ICC profile data. The function returns logical 1 (true).

tf = isicc(profile)
tf =logical1

Create a new ICC profile data without the header and copyright fields. Usermfieldto remove the 'Header' and 'Copyright' fields from the ICC profile data structure.

newProfile = rmfield(profile,{'Header','Copyright'});

Inspect the new profile data to verify that the 'Header' and 'Copyright' fields are removed.

newProfile
newProfile =struct with fields:TagTable: {17x3 cell} Description: [1x1 struct] MediaWhitePoint: [0.9505 1 1.0891] MediaBlackPoint: [0 0 0] DeviceMfgDesc: [1x1 struct] DeviceModelDesc: [1x1 struct] ViewingCondDesc: [1x1 struct] ViewingConditions: [1x1 struct] Luminance: [76.0365 80 87.1246] Measurement: [1x1 struct] Technology: 'Cathode Ray Tube Display' MatTRC: [1x1 struct] PrivateTags: {} Filename: 'sRGB.icm'

Check ifnewProfileis a valid ICC profile data. The function returns logical 0 (false).

tf = isicc(newProfile)
tf =logical0

Input Arguments

collapse all

ICC档案数据,指定了s a structure array, represents an ICC profile in the data format returned byiccread. The ICC profile data must contain all the tags and fields required by the ICC profile specification.

Data Types:struct

Output Arguments

collapse all

Valid ICC profile, returned as logical 1 (true) when the input is a valid ICC profile data, and logical 0 (false) otherwise.

Algorithms

isiccchecks ifprofilehas a complete set of the tags required for an ICC profile.profilemust contain aHeaderfield, which in turn must contain aVersionfield and aDeviceClassfield. These fields along with others, are used to determine the set of required tags according to the ICC profile specification. The required tags for ICC profile specifications related to Version 2 (ICC.1:2001-04) and Version 4 (ICC.1:2001-12) are available athttps://www.color.org.

Version History

Introduced before R2006a