ColorContext ColorContext ColorContext ColorContext Class

Definition

Represents the International Color Consortium (ICC) or Image Color Management (ICM) color profile that is associated with a bitmap image.

public ref class ColorContext
public class ColorContext
type ColorContext = class
Public Class ColorContext
Inheritance
ColorContextColorContextColorContextColorContext

Examples

The following code example demonstrates how to get the color profile that is associated with a bitmap image.

ColorConvertedBitmap myColorConvertedBitmap = new ColorConvertedBitmap();
myColorConvertedBitmap.BeginInit();
myColorConvertedBitmap.SourceColorContext = myBitmapSourceFrame2.ColorContexts[0];
myColorConvertedBitmap.Source = myBitmapSource2;
myColorConvertedBitmap.DestinationFormat = PixelFormats.Pbgra32;
myColorConvertedBitmap.DestinationColorContext = new ColorContext(PixelFormats.Bgra32);
myColorConvertedBitmap.EndInit();
Dim myColorConvertedBitmap As New ColorConvertedBitmap()
myColorConvertedBitmap.BeginInit()
myColorConvertedBitmap.SourceColorContext = myBitmapSourceFrame2.ColorContexts(0)
myColorConvertedBitmap.Source = myBitmapSource2
myColorConvertedBitmap.DestinationFormat = PixelFormats.Pbgra32
myColorConvertedBitmap.DestinationColorContext = New ColorContext(PixelFormats.Bgra32)
myColorConvertedBitmap.EndInit()

Remarks

The supported standard color spaces are sRGB, ScRGB, RGB, CMYK, Gray, Multichannel, and unknown.

Constructors

ColorContext(PixelFormat) ColorContext(PixelFormat) ColorContext(PixelFormat) ColorContext(PixelFormat)

Initializes a new instance of ColorContext with the standard color profile (sRGB or RGB ) that most closely matches the supplied PixelFormat.

ColorContext(Uri) ColorContext(Uri) ColorContext(Uri) ColorContext(Uri)

Initializes a new instance of ColorContext with the International Color Consortium (ICC) or Image Color Management (ICM) color profile located at a given Uri.

Properties

ProfileUri ProfileUri ProfileUri ProfileUri

Gets a Uri that represents the location of a International Color Consortium (ICC) or Image Color Management (ICM) color profile.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether an Object is equal to an instance of ColorContext.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Gets the hash code for this instance of ColorContext.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OpenProfileStream() OpenProfileStream() OpenProfileStream() OpenProfileStream()

Returns a readable Stream of raw color profile data.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Operators

Equality(ColorContext, ColorContext) Equality(ColorContext, ColorContext) Equality(ColorContext, ColorContext) Equality(ColorContext, ColorContext)

Operates on two instances of ColorContext to determine equality.

Inequality(ColorContext, ColorContext) Inequality(ColorContext, ColorContext) Inequality(ColorContext, ColorContext) Inequality(ColorContext, ColorContext)

Operates on two instances of ColorContext to determine that they are not equal.

Applies to

See also