This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

isicc

Check for valid ICC profile data

Syntax

tf = isicc(profile)

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 if profile is a valid ICC profile data. The function returns logical 1 (true).

tf = isicc(profile)
tf = logical
   1

Create a new ICC profile data without the header and copyright fields. Use rmfield to 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 if newProfile is a valid ICC profile data. The function returns logical 0 (false).

tf = isicc(newProfile)
tf = logical
   0

Input Arguments

collapse all

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.

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

isicc checks if profile has a complete set of the tags required for an ICC profile. profile must contain a Header field, which in turn must contain a Version field and a DeviceClass field. 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 at www.color.org.

Introduced before R2006a