←Select platform

IccProfileExtended Class

Contains all of the data for a complete ICC profile.
public class IccProfileExtended 
public ref class IccProfileExtended  
class IccProfileExtended: 
  • The data in all the members (except for the data in the tagData and the data arrays)is converted into Little Endian format.
  • The data in the data member and tagData array is not directly accessed. ICC defined methods use the data in them, so they are kept in Big Endian format.
  • When an existing ICC profile is loaded into this structure, the data member contains all of the profile data as one block of memory. The TagData array contains only the tag data in one block of memory.
  • Whether a new ICC profile is being created or an existing one is being modified, the TagData always contains the right values. The Data array, however, will not contain the correct values until a call to the UpdateDataArray method is made. This call updates the Data array with the latest modifications.
using Leadtools; 
using Leadtools.ColorConversion; 
using Leadtools.Codecs; 
public string outputIccFile = Path.Combine(LEAD_VARS.ImagesDir, "IccProfileExtended.icc"); 
public DateTime sysDateTime = DateTime.Now; // Get the current system data 
public void IccProfileExtendedExample() 
   // Define the IccProfileExtended Class 
   IccProfileExtended iccProfile = new IccProfileExtended(); 
   // Define the IccHeader class 
   IccHeader header = IccHeader.Empty; 
   // Fill the ICC header 
   // The Illuminant, ProfileSignature, and Version are filled with the default values in the IccProfile.Empty property 
   // The Size field will be filled automatically by the different ICC methods 
   // These should not be changed unless the user knows what they are doing 
   // The ProfileID which will be filled using the IccProfile.GenerateProfileId method 
   // This method must be called at the end when the ICC Profile is completely prepared 
   // The rest of the fields are the user's responsibility 
   header.CmmID = 0x6170706C; // Any CMM ID 
   header.DeviceClass = IccProfileClassType.DeviceLinkClass; 
   header.ColorSpace = IccColorspaceType.LabData; 
   header.Pcs = IccColorspaceType.LabData; 
   header.ProfileSignature = 0x61637370; // Any profile signature 
   header.Platform = IccPlatformSignatureType.MacintoshSignature; 
   header.Flags = IccProfileFlags.None; 
   header.Manufacturer = 0x46464549; // Any manufacturer 
   header.Model = 0x0; // Any model 
   header.Attributes = IccProfileMediaFlags.ColorMedia; 
   header.RenderingIntent = IccRenderingIntentType.AbsoluteColorimetric; 
   header.Creator = 0x46464549; // Any creator 
   // Set the system date/time as the date/time of the ICC profile 
   IccDateTime iccDateTime = new IccDateTime((ushort)sysDateTime.Year, 
   header.DateTime = iccDateTime; 
   iccProfile.Header = header; 
   // Create and add required tags to the extended profile 
   // mediaBlackPointTag (needs the XYZ tag type) 
   // Define the array of XYZ numbers 
   IccXyzNumber[] data = new IccXyzNumber[1]; 
   data[0] = new IccXyzNumber( 
   // Create the XYZ tag type 
   IccXyzTagType xyzTagType = new IccXyzTagType(data); 
   // Insert into the profile 
   iccProfile.AddTag(xyzTagType, IccTag.MediaBlackPointTag, IccTagTypeBase.XyzTypeSignature); 
   // calibrationDateTimeTag 
   // Define the tag type 
   IccDateTimeTagType dateTimeTagType = new IccDateTimeTagType(iccDateTime); 
   // Insert into the profile 
   iccProfile.AddTag(dateTimeTagType, IccTag.CalibrationDateTimeTag, IccTagTypeBase.DateTimeTypeSignature); 
   // This method shows how to get the tag type signature of any tag in the profile 
   int tagTypeSignature = iccProfile.GetTagTypeSignature(IccTag.MediaBlackPointTag); 
   // This method shows how to delete a specified tag 
   xyzTagType = (IccXyzTagType)iccProfile.DeleteTag(IccTag.MediaBlackPointTag); 
   // This method shows how to retrieve the value of a tag 
   dateTimeTagType = (IccDateTimeTagType)iccProfile.GetTag(IccTag.CalibrationDateTimeTag); 
   // Generate the profileId. For the time being, it will be filled with 0's 
   // Generate the new ICC profile by updating the Data Array and then generating the file 
static class LEAD_VARS 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ColorConversion Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.