LoadImageResized

Family: Image · 2 forms

What it does

LoadImageResized loads Resized on a Image object. It takes iImageID (an integer), szFilename (a string), scaleX (a float), scaleY (a float) and cache (an integer), and returns nothing. That is the first of 2 forms. iImageID is the id you are giving an Image object: every later call names it by that number.

Syntax

1
LoadImageResized(iImageID integer, szFilename string, scaleX float, scaleY float, cache integer)
2
LoadImageResized(szFilename string, scaleX float, scaleY float, cache integer) → integer

Parameters

NameTypeIn forms
iImageIDinteger1
szFilenamestringall
scaleXfloatall
scaleYfloatall
cacheintegerall

What each form returns

1LoadImageResized(1, "assets/sprite.png", 1.0, 1.0, 1)nothing
2imageResized = LoadImageResized("assets/sprite.png", 1.0, 1.0, 1)integer

Example · generated

Form 1, you choose the id yourself

LoadImageResized(1, "assets/sprite.png", 1.0, 1.0, 1)DO  Sync()LOOP

Form 2, the command hands back the id

imageResized = LoadImageResized("assets/sprite.png", 1.0, 1.0, 1)DO  Sync()LOOP

LoadImageResized is called with values of the types its signature asks for. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

Related commands

35 commands in Image