Table of Contents

Method TryLoadFileAsBitmapBgra32

Namespace
PaintDotNet.FileTypes
Assembly
PaintDotNet.FileTypes.dll

TryLoadFileAsBitmapBgra32(IFileTypesService1, string, IColorContext?)

Like LoadFileAsBitmapBgra32(IFileTypesService1, string, IColorContext?), but returns null instead of throwing an exception when an error is encountered.

public static IFileTypeBitmapSource<ColorBgra32>? TryLoadFileAsBitmapBgra32(this IFileTypesService1 service, string filePath, IColorContext? targetColorContext = null)

Parameters

service IFileTypesService1
filePath string
targetColorContext IColorContext

Returns

IFileTypeBitmapSource<ColorBgra32>