GetTextureSize
From OxeyeWiki
(Difference between revisions)
Jeb (Talk | contribs)
(Created page with '{{VideoMethod | video.getTextureSize(textureFileName) | Fetches the width and height of a texture. | {{MethodParam|textureFileName|String|The name of the texture you want to fetc...')
(Created page with '{{VideoMethod | video.getTextureSize(textureFileName) | Fetches the width and height of a texture. | {{MethodParam|textureFileName|String|The name of the texture you want to fetc...')
Latest revision as of 20:28, 27 December 2009
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")