Let's load an image file and draw it on the screen. We will not want to change the pixel values, so we will use the
ofTexture class for this task. Perform the following steps:
ofLoadImage( image, "collage.png" );
draw()function, right after the
ofBackground...command, add the code for drawing the image:
ofSetColor( 255 ); image.draw( 0, 0, ofGetWidth(), ofGetHeight() );
The first line sets up the white drawing color, which serves here as an image drawing color (see the details about the
ofSetColor function in Chapter 2, Creating Your First openFrameworks Project ...