Table of Contents

Method GetColorContext

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.Core.dll

GetColorContext(IDeviceContext)

Gets the IDeviceColorContext associated with this IDeviceContext. This defines the working space for the device context when color management is enabled.

public static IDeviceColorContext? GetColorContext(this IDeviceContext deviceContext)

Parameters

deviceContext IDeviceContext

Returns

IDeviceColorContext

The color context for the device context if there is one, or null if color management is not being automatically performed.

Remarks

Images should typically be converted from their color space to this color space so that they are displayed correctly. You can use the ColorManagementEffect for this. Effect plugins will be provided with images that have already been converted to this color context.