Table of Contents

Method TryCreateDefaultColorContext

Namespace
PaintDotNet.Imaging
Assembly
PaintDotNet.Windows.Core.dll

TryCreateDefaultColorContext(IImagingFactory, in PixelFormat)

Creates the default color context for the given pixel format, or returns null.

public static IColorContext? TryCreateDefaultColorContext(this IImagingFactory factory, in PixelFormat pixelFormat)

Parameters

factory IImagingFactory
pixelFormat PixelFormat

Returns

IColorContext

TryCreateDefaultColorContext(IImagingFactory, in PixelFormat, out IColorContext?)

Creates the default color contex for the given pixel format, if possible.

public static bool TryCreateDefaultColorContext(this IImagingFactory factory, in PixelFormat pixelFormat, out IColorContext? colorContext)

Parameters

factory IImagingFactory
pixelFormat PixelFormat
colorContext IColorContext

Returns

bool