Class IccProfile
Represents an ICC profile
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Metadata.Profiles.Icc
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class IccProfile : IDeepCloneable<IccProfile>
Constructors
| Improve this Doc View SourceIccProfile()
Initializes a new instance of the IccProfile class.
Declaration
public IccProfile()
IccProfile(Byte[])
Initializes a new instance of the IccProfile class.
Declaration
public IccProfile(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | data | The raw ICC profile data |
Properties
| Improve this Doc View SourceEntries
Gets the actual profile data
Declaration
public IccTagDataEntry[] Entries { get; }
Property Value
Type | Description |
---|---|
IccTagDataEntry[] |
Header
Gets or sets the profile header
Declaration
public IccProfileHeader Header { get; set; }
Property Value
Type | Description |
---|---|
IccProfileHeader |
Methods
| Improve this Doc View SourceCalculateHash(Byte[])
Calculates the MD5 hash value of an ICC profile
Declaration
public static IccProfileId CalculateHash(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | data | The data of which to calculate the hash value |
Returns
Type | Description |
---|---|
IccProfileId | The calculated hash |
CheckIsValid()
Checks for signs of a corrupt profile.
Declaration
public bool CheckIsValid()
Returns
Type | Description |
---|---|
Boolean | True if the profile is valid; False otherwise |
Remarks
This is not an absolute proof of validity but should weed out most corrupt data.
DeepClone()
Creates a new T
that is a deep copy of the current instance.
Declaration
public IccProfile DeepClone()
Returns
Type | Description |
---|---|
IccProfile | The |
ToByteArray()
Converts this instance to a byte array.
Declaration
public byte[] ToByteArray()
Returns
Type | Description |
---|---|
Byte[] | The byte[] |