Get the aspect ratio (width / height)
The aspect ratio
Check if the image is valid
True if the image is valid, false otherwise
Get the recommended image size
The size as { width, height }
Get the image unique ID
The image ID
Dispose the image resources
Get the renderable image
Optionalsize: { height: number; width: number }The optional size as { width, height }
The image format (default: png)
The renderable image or undefined if not valid
Get the image data as a Uint8Array
Optionalsize: { height: number; width: number }The optional size as { width, height }
The image format (default: png)
The image data or undefined if not valid
ProtectedregisterRegisters an object for auto release. When the object is not used anymore, it will be released automatically from C++.
The pointer ID to register
StaticcreateCreates a new image from binary data
The image binary data
The image format (default: auto-detect)
A new Img instance
StaticfromCreates an image from an asset
The URL of the asset
A promise that resolves to an Img instance
StaticinitInternalCreates an Img instance from a pointer ID
The pointer ID
A new Img instance
Class used for basic images
Represents the image in an abstract way, providing metadata and access to the RenderableImg.