Editar

Compartir vía


ColorContext Constructors

Definition

Initializes a new instance of ColorContext.

Overloads

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.

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)

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

public:
 ColorContext(Uri ^ profileUri);
public ColorContext (Uri profileUri);
[System.Security.SecurityCritical]
public ColorContext (Uri profileUri);
new System.Windows.Media.ColorContext : Uri -> System.Windows.Media.ColorContext
[<System.Security.SecurityCritical>]
new System.Windows.Media.ColorContext : Uri -> System.Windows.Media.ColorContext
Public Sub New (profileUri As Uri)

Parameters

profileUri
Uri

The Uri that identifies the location of the desired color profile.

Attributes

Remarks

To use any of the unsupported color profiles, you must install one and use its URI to initialize the ColorContext by using the ColorContext constructor.

Applies to

ColorContext(PixelFormat)

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

public:
 ColorContext(System::Windows::Media::PixelFormat pixelFormat);
[System.Security.SecurityCritical]
public ColorContext (System.Windows.Media.PixelFormat pixelFormat);
public ColorContext (System.Windows.Media.PixelFormat pixelFormat);
[<System.Security.SecurityCritical>]
new System.Windows.Media.ColorContext : System.Windows.Media.PixelFormat -> System.Windows.Media.ColorContext
new System.Windows.Media.ColorContext : System.Windows.Media.PixelFormat -> System.Windows.Media.ColorContext
Public Sub New (pixelFormat As PixelFormat)

Parameters

pixelFormat
PixelFormat

The PixelFormat from which the ColorContext is derived.

Attributes

Examples

The following code example demonstrates how to construct a new instance of ColorContext.

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()

See also

Applies to