self:get_size

Client

Retrieves the current size of the image


Syntax

local size = self:get_size()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector2sizeCurrent size of the image as {width, height}

Examples

Get the size of an image
local entity = core.image.create("assets/sprite.png")
local size = entity:get_size()

core.engine.print("info", "Image size:", util.table.unpack(size))

On this page