Click or drag to resize
Ab4d.SharpEngine logo

PngBitmapIO Class

PngBitmapIO is a build-in png reader and writer and implement bitmap IO operations that are defined in IBitmapIO interface. By default, the FileNotFoundResolver in PngBitmapIO is set to a method that tries to resolve the file name by combining it with the base directory of the application.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.UtilitiesPngBitmapIO

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public class PngBitmapIO : IBitmapIO

The PngBitmapIO type exposes the following members.

Constructors
 NameDescription
Public methodPngBitmapIOInitializes a new instance of the PngBitmapIO class
Top
Properties
 NameDescription
Public propertyConvertToSupportedFormatObsolete
Public propertyFileNotFoundResolver Gets or sets a Func that takes file name of a file that does not exist and returns an existing file name. If file name is not resolved, then null is returned. By default, the FileNotFoundResolver in PngBitmapIO is set to a method that tries to resolve the file name by combining it with the base directory of the application.
Public propertyFileNotSupportedResolver Gets or sets a Func that takes file name of a file in a file format that is not .png (only png is supported by PngBitmapIO). 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 exist 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, BitmapLoadOptions) Load bitmap into the RawImageData struct
Public methodLoadBitmap(Stream, String, BitmapLoadOptions) Load bitmap into the RawImageData struct
Public methodSaveBitmap(RawImageData, String) Save bitmap from the RawImageData to the specified file.
Public methodSaveBitmap(RawImageData, Stream, String) Save bitmap from the RawImageData to the specified fileStream.
Top
See Also