GetTextureResolution
This function was added in DSL 1
Description
Get the resolution of a texture
. Keep in mind that textures are drawn using normalized coords, so you will not usually need the actual resolution.
function GetTextureResolution(texture) --[[ ... ]] end
Parameters
texture
:userdata
- The texture to get the resolution of.
Return Values
width
:number
- The width of the texture.height
:number
- The height of the texture.
Example
local texture = CreateTexture('example.png')
local width, height = GetTextureResolution(texture)
print('Texture resolution: ' .. width .. 'x' .. height)
See Also
- DSL