uploadImage()
Purpose
Create an image in code
Description
Create an image from pixel data stored in the actual code of the program
Syntax
handle = uploadImage( pixeldata, width, height, filter )
Arguments
pixeldata An array of (width x height) colours
width Desired on-screen width in pixels
height Desired on-screen width in pixels
filter Sets filtering on or off - generally on for real images and off for pixel art
handle handle of the image
Example
t = { 0, 0, 0, 0 } // transparent
w = white
alien = [
t, t, t, w, w, t, t, t,
t, t, w, w, w, w, t, t,
t, w, w, w, w, w, w, t,
w, w, w, w, w, w, w, w,
w, w, t, w, w, t, w, w,
w, w, w, t, t, w, w, w,
w, w, t, w, w, t, w, w,
w, w, w, w, w, w, w, w,
w, w, t, w, w, t, w, w
]
alienimage = uploadImage( alien, 8, 9, false )
drawImage( alienimage, 0, 0, 50 )
loop
update()
repeat
Associated Commands
clear(), createImage(), drawImage(), drawImageEx(), drawQuad(), drawSheet(), loadImage(), update()