imageSize()
Purpose
Get the size of a loaded image
Description
Returns the width and height of an image previosuly loaded with loadimage
Syntax
size = imageSize( sprite )
Arguments
sprite handle returned by a call to loadimage
size vector containing the width (.x) and height (.y) of the image
Example
// Scale an image to fit to the screen
img = loadImage( "Colin Brown/DungeonB", false )
size = imageSize( img )
scale = min( gwidth() / size.x, gheight() / size.y )
drawImage( img, 0, 0, scale )
update()
sleep( 3 )
Associated Commands
clear(), createImage(), drawImage(), drawQuad(), drawSheet(), loadImage(), update(), uploadImage()