Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

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()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.