Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

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

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.