←Select platform

IccDateTime Structure

Summary
Contains date/time information to be used in the calibrationDateTime tag.
Syntax
C#
C++/CLI
Python
public struct IccDateTime 
public value class IccDateTime : public System.ValueType  
class IccDateTime: 
Remarks
  • All the date/time number values in a profile shall be in Coordinated Universal Time (UTC, also known as GMT or ZULU Time). Profile writers are required to convert local time to UTC when setting these values.
Example
C#
using Leadtools; 
using Leadtools.ColorConversion; 
 
using Leadtools.Codecs; 
 
public string outputIccFile = Path.Combine(LEAD_VARS.ImagesDir, "IccDateTimeTagType.icc"); 
public System.DateTime sysDateTime = System.DateTime.Now; // Get the current system data 
 
public void IccDateTimeTagTypeExample() 
{ 
   // Load an ICC profile 
   string fileName = Path.Combine(LEAD_VARS.ImagesDir, "InputProfile.icc"); 
   IccProfileExtended iccProfile = new IccProfileExtended(fileName); 
 
   // Create a new iccDateTime class 
   IccDateTime iccDateTime = new IccDateTime((ushort)sysDateTime.Year, 
      (ushort)sysDateTime.Month, 
      (ushort)sysDateTime.Day, 
      (ushort)sysDateTime.Hour, 
      (ushort)sysDateTime.Minute, 
      (ushort)sysDateTime.Second); 
 
   // Define the tag type 
   IccDateTimeTagType iccDateTimeTagType = new IccDateTimeTagType(iccDateTime); 
 
   // Add the new tag to the ICC profile 
   iccProfile.AddTag(iccDateTimeTagType, IccTag.CalibrationDateTimeTag, IccTagTypeBase.DateTimeTypeSignature); 
 
   // Generate the new profile ID 
   iccProfile.GenerateProfileId(); 
 
   // Update the ICC array with the new changes 
   iccProfile.UpdateDataArray(); 
 
   // Write the ICC profile into a new file 
   iccProfile.GenerateIccFile(outputIccFile); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

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.