Image in Processing

Processing is a Java application that uses code to create shapes, colour, animation etcetera. int steve=50; int speed=5; PImage pelicanofdoom; void setup() { background(255,0,0); size(700,700); pelicanofdoom =loadImage(“pelican-photo2.png”); } void draw() { image(pelicanofdoom,mouseX,mouseY); } To use an image, you have to type the filename into the pImage tag (shown above) and into the void tags.

Pelican Processing

Moving the mouse cursor pastes multiple duplicates of the image you have added.  Try and draw out your name or cover the entire screen!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s