Struct ImageTexture

A Texture based on an Image.

struct ImageTexture ;

Can be created from an Image with createFromImage.

Properties

NameTypeDescription
lossyQuality[get, set] doubleThe storage quality for constant STORAGE_COMPRESS_LOSSY.
storage[get, set] ImageTexture.StorageThe storage type (raw, lossy, or compressed).

Methods

NameDescription
_reloadHook
create Create a new ImageTexture with width and height. format is a value from Image.format, flags is any combination of Texture.flags.
createFromImage Create a new ImageTexture from an Image with flags from Texture.flags. An sRGB to linear color space conversion can take place, according to Image.format.
getFormat Returns the format of the ImageTexture, one of Image.format.
getLossyStorageQuality
getStorage
load Load an ImageTexture from a file path.
setData Sets the Image of this ImageTexture.
setLossyStorageQuality
setSizeOverride Resizes the ImageTexture to the specified dimensions.
setStorage

Enums

NameDescription
Constants
Storage