public struct IccTagList public value class IccTagList : public System.ValueType class IccTagList: using Leadtools;using Leadtools.ColorConversion;using Leadtools.Codecs;public string inputIccFile = Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "IccProfileExtended.icc");public string outputIccFile = Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "IccProfileExtendedConstructor.icc");public DateTime sysDateTime = DateTime.Now; // Get the current system datapublic void IccProfileExtendedConstructorExample(){// Load an ICC profileIccProfileExtended iccProfile = new IccProfileExtended(inputIccFile);// Create the new headerIccHeader header = IccHeader.Empty;header.CmmID = 0x6170706C; // Any CMM IDheader.DeviceClass = IccProfileClassType.DeviceLinkClass;header.ColorSpace = IccColorspaceType.LabData;header.Pcs = IccColorspaceType.LabData;header.ProfileSignature = 0x61637370; // Any profile signatureheader.Platform = IccPlatformSignatureType.MacintoshSignature;header.Flags = IccProfileFlags.None;header.Manufacturer = 0x46464549; // Any manufacturerheader.Model = 0x0; // Any modelheader.Attributes = IccProfileMediaFlags.ColorMedia;header.RenderingIntent = IccRenderingIntentType.AbsoluteColorimetric;header.Creator = 0x46464549; // Any creator// Set the system date/time as the date/time of the ICC profileIccDateTime iccDateTime = new IccDateTime((ushort)sysDateTime.Year,(ushort)sysDateTime.Month,(ushort)sysDateTime.Day,(ushort)sysDateTime.Hour,(ushort)sysDateTime.Minute,(ushort)sysDateTime.Second);header.DateTime = iccDateTime;// Copy the tag listint tagCount = iccProfile.TagList.Tags.Length;IccTag[] tags = new IccTag[tagCount];for (int i = 0; i < tagCount; i++){tags[i] = new IccTag(iccProfile.TagList.Tags[i].Signature,iccProfile.TagList.Tags[i].Offset,iccProfile.TagList.Tags[i].Size);}IccTagList tagList = new IccTagList(tags);// Copy the tag databyte[] tagData = new byte[iccProfile.TagData.Length];iccProfile.TagData.CopyTo(tagData, 0);// Create the new ICC profile, the Data array parameter will not be passed, because it will be updated when calling the UpdateDataArray() method.IccProfileExtended newIccProfile = new IccProfileExtended(header, tagList, tagData, null);// Generate the profileId. For the time being, it will be filled with 0'snewIccProfile.GenerateProfileId();// Finally generate the new ICC profile by updating the Data Array and then generating the filenewIccProfile.UpdateDataArray();newIccProfile.GenerateIccFile(outputIccFile);}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
