ImageFormatLoaderExtension
Base class for creating ImageFormatLoader extensions (adding support for extra image formats).
Base class for creating ImageFormatLoader extensions (adding support for extra image formats).
The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending this class.
Be sure to respect the documented return types and values. You should create an instance of it, and call ImageFormatLoaderExtension.AddFormatLoader to register that loader during the initialization phase.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
ImageFormatLoaderExtensionConstructor
public ImageFormatLoaderExtension();Methods4
AddFormatLoadervoid
public void AddFormatLoader();Add this format loader to the engine, allowing it to recognize the file extensions returned by ImageFormatLoaderExtension._GetRecognizedExtensions.
RemoveFormatLoadervoid
public void RemoveFormatLoader();Remove this format loader from the engine.
_GetRecognizedExtensionsstring[]
public virtual string[] _GetRecognizedExtensions();Returns the list of file extensions for this image format. Files with the given extensions will be treated as image file and loaded using this class.
string[]_LoadImageError
public virtual Error _LoadImage(Image image, FileAccess fileaccess, ImageFormatLoader.LoaderFlags flags, float scale);Loads the content of fileaccess into the provided image.
| Name | Type | Default |
|---|---|---|
image | Image | — |
fileaccess | FileAccess | — |
flags | ImageFormatLoader.LoaderFlags | — |
scale | float | — |
Error