Class FileDecoder
Provides methods for platform specific conversions of file content.
Inheritance
Inherited Members
Namespace: Fusee.Base.Imp.Android
Assembly: Fusee.Base.Imp.Android.dll
Syntax
public static class FileDecoder
Methods
LoadImage(Stream)
Creates a new Bitmap-Object from an image file, locks the bits in the memory and makes them available for further action (e.g. creating a texture). Method must be called before creating a texture to get the necessary ImageData struct.
Declaration
public static ImageData LoadImage(Stream file)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | file | Stream containing the image in a supported format (png, jpg). |
Returns
Type | Description |
---|---|
ImageData | An ImageData object with all necessary information for the texture-binding process. |
LoadImageAsync(Stream)
Creates a new Bitmap-Object from an image file, locks the bits in the memory and makes them available for further action (e.g. creating a texture). Method must be called before creating a texture to get the necessary ImageData struct.
Declaration
public static Task<ImageData> LoadImageAsync(Stream file)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | file | Stream containing the image in a supported format (png, jpg). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ImageData> | An ImageData object with all necessary information for the texture-binding process. |