[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Graphics.ColorSpaces.ICCProfile

Class ICCProfile

Namespace
GrapeCity.Documents.Pdf.Graphics.ColorSpaces
Assembly
GcDocs.Pdf.dll

Represents a PDF ICC profile stream.

public class ICCProfile : PdfDictWrapper, IPdfDict
Inheritance
object
ICCProfile
Implements
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Extension Methods

Constructors

ICCProfile()

Initializes a new instance of the ICCProfile class.

public ICCProfile()

Properties

N

Gets or sets the number of color components in the color space described by the ICC profile data.

This number shall match the number of components actually in the ICC profile. Valid values are 1, 3, or 4.

public int N { get; set; }

Property Value

int

Range

Gets or sets an array of 2 x N numbers [min0 max0, min1 max1, ...] that shall specify the minimum and maximum valid values of the corresponding color components. These values shall match the information in the ICC profile.

public float[] Range { get; set; }

Property Value

float[]

Methods

Create(Stream)

Creates an ICCProfile object for the specified ICC profile metadata.

This method returns null if metadata has invalid data or is in unknown format.

public static ICCProfile Create(Stream metadata)

Parameters

metadata System.IO.Stream

The ICC profile metadata.

Returns

ICCProfile

The ICCProfile object or null if metadata contains invalid or unsupported data.

Create(string)

Creates an ICCProfile object for ICC profile metadata loaded from the specified file.

This method returns null if fileName has invalid data or is in unknown format.

public static ICCProfile Create(string fileName)

Parameters

fileName string

The file containing the ICC profile metadata.

Returns

ICCProfile

The ICCProfile object or null if fileName contains invalid or unsupported data.

GetMetadata()

Gets a System.IO.Stream containing the metadata for the color space.

Notes:

  1. The stream returned by this method should be disposed after use.
  2. This method can return null if the metadata is empty.
public Stream GetMetadata()

Returns

System.IO.Stream

A stream with the metadata.

SetMetadata(byte[])

Sets the metadata for the color space. Note! The method does NOT update N, it is user responsibility to set it to appropriate value.

public void SetMetadata(byte[] metadata)

Parameters

metadata byte[]

The metadata.