topical media & game development

talk show tell print

graphic-processing-learning-15-example-15-1-example-15-1.pde / pde



  // Learning Processing
  // Daniel Shiffman
  // http://www.learningprocessing.com
  
  // Example 15-1: "Hello World" images
  
  // Declaring a variable of type PImage, a class available to us from the Processing core library.
  PImage img; 
  
  void setup() {
    size(320,240);
    // Make a new instance of a PImage by loading an image file
    img = loadImage("soutine.jpg");
  }
  
  void draw() {
    background(0);
     //The image() function displays the image at a location-in this case the point (0,0).
    image(img,0,0);
  }
  


(C) Æliens 23/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.