GetTextureSize
From OxeyeWiki
video.getTextureSize(textureFileName) | ||
Fetches the width and height of a texture. | ||
Parameter | Expected Type | Description |
textureFileName | String | The name of the texture you want to fetch the size of. Supported file formats are TGA and JPEG. |
Returns | ||
Returns width and height of the texture, or nothing if the texture can't be read or loaded. |
Notes
Once a texture has been loaded, it will be cached in memory. Textures are loaded as soon as they are used.
Example
local w, h = video.getTextureSize("image.jpg")