ColorContext Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
-
ColorContext
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()
The supported standard color spaces are sRGB, ScRGB, RGB, CMYK, Gray, Multichannel, and unknown.
Color |
Initializes a new instance of ColorContext with the standard color profile (sRGB or RGB ) that most closely matches the supplied PixelFormat. |
Color |
Initializes a new instance of ColorContext with the International Color Consortium (ICC) or Image Color Management (ICM) color profile located at a given Uri. |
Profile |
Gets a Uri that represents the location of a International Color Consortium (ICC) or Image Color Management (ICM) color profile. |
Equals(Object) |
Determines whether an Object is equal to an instance of ColorContext. |
Get |
Gets the hash code for this instance of ColorContext. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Open |
Returns a readable Stream of raw color profile data. |
To |
Returns a string that represents the current object. (Inherited from Object) |
Equality(Color |
Operates on two instances of ColorContext to determine equality. |
Inequality(Color |
Operates on two instances of ColorContext to determine that they are not equal. |
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: