Home > @magiclane/maps-sdk > Img

Img class

Class used for basic images

Represents the image in an abstract way, providing metadata and access to the RenderableImg.

Signature:

export declare class Img extends ImgBase 

Extends: ImgBase

Properties

Property

Modifiers

Type

Description

aspectRatio

readonly

number

Get the aspect ratio (width / height)

size

readonly

{ width: number; height: number; }

Get the recommended image size

Methods

Method

Modifiers

Description

create(data, format)

static

Creates a new image from binary data

dispose()

Dispose the image resources

fromAsset(url)

static

Creates an image from an asset

getRenderableImage(size, format, allowResize)

Get the renderable image