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
IImagingFactorypixelFormat
PixelFormat
Returns
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
IImagingFactorypixelFormat
PixelFormatcolorContext
IColorContext