image()

Description

This routine paints an image on the screen. Images are usually stored in flash memory by using the image uploader tool, which is found inside the Antipasto Arduino IDE under the Tools menu.

Syntax


image(PImage, x_pos, y_pos);


Parameters

PImage – The image loaded from flash. You must loadImage() before calling this routine.
int x_pos – The x coordinate to draw the image.
int y_pos – The y coordinate to draw the image.

Returns

Nothing.

Example

PImage battlePic; //Create an image

void setup() {
background(0); //set the entire screen to black

open(FlashTransfer); //Waits for the IDE to send files to TouchShield’s flash storage.
battlePic = loadImage(“battle.bmp”); //read the uploaded image file from memory

image(battlePic,0,0); //paint image at pixel location (0,0)
}

void loop() {
// Do nothing!
}

Related
open(FlashTransfer)
FlashTransfer
PImage
image()
loadImage()




Edit History