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
| Edit this page 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
| Edit this page 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
| Edit this page 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 |
---|---|
bool | 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 IccProfile that is a deep copy of the current instance.
Declaration
public IccProfile DeepClone()
Returns
Type | Description |
---|---|
IccProfile | The IccProfile. |
ToByteArray()
Converts this instance to a byte array.
Declaration
public byte[] ToByteArray()
Returns
Type | Description |
---|---|
byte[] | The byte[] |