Click or drag to resize
Ab4d.SharpEngine logo

WinUIBitmapIO Class

WinUIBitmapIO uses WinUI's bitmap load and save methods to support cross platform bitmap IO operations that are defined in IBitmapIO interface.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.WinUIWinUIBitmapIO

Namespace: Ab4d.SharpEngine.WinUI
Assembly: Ab4d.SharpEngine.WinUI (in Ab4d.SharpEngine.WinUI.dll) Version: 1.0.8740+dd919213ce98c470a123b140574ba91ba31d337e
Syntax
C#
public class WinUIBitmapIO : IBitmapIO

The WinUIBitmapIO type exposes the following members.

Constructors
 NameDescription
Public methodWinUIBitmapIOInitializes a new instance of the WinUIBitmapIO class
Top
Properties
 NameDescription
Public propertyConvertToSupportedFormat When true (by default) then the loaded images are converted into a format that is supported by the engine (32 bit BGRA or RGBA format) When false then the loader tries to preserve the format of the bitmap (for example 8 bit for grayscale) but this is not guaranteed and the loader may still convert the image to BGRA. Also, it is not guaranteed that the image in the original format will be correctly displayed.
Public propertyFileNotFoundResolver Gets or sets a Func that takes file name of a file that does not exists and returns an existing file name. If file name is not resolved, then null is returned.
Public propertyFileStreamResolver Gets or sets a Func that takes file name of a file that does not exists and returns a stream to the file. The returned stream is closed after the bitmap is read. If file name is not resolved, then null is returned.
Top
Methods
 NameDescription
Public methodIsFileFormatExportSupported Returns true when exporting a bitmap to the specified file format that is defined by the fileExtension is supported.
Public methodIsFileFormatImportSupported Returns true when importing a bitmap from the specified file format that is defined by the fileExtension is supported.
Public methodIsStreamSupported Returns true when methods that take Stream as parameter are supported. When false, then only methods that take fileName are supported.
Public methodLoadBitmap(String) Load bitmap into the GpuImageData struct
Public methodLoadBitmap(Stream, String) Load bitmap into the GpuImageData struct
Public methodSaveBitmap(RawImageData, String) Save bitmap from the GpuImageData to the specified file.
Public methodSaveBitmap(RawImageData, Stream, String) Save bitmap from the GpuImageData to the specified fileStream.
Top
See Also