Load and display the first image
Listing 2 loads and displays the starfish image shown at the top in Figure 1.
Listing 2. Load and display the starfish image.
//Declare a pointer variable capable of pointing to a
// bitmap.
BITMAP *picA = NULL;
//Load an image file from the current directory.
picA = load_bitmap("starfish.pcx", NULL);
//Copy the image to the upper-left corner of the
// onscreen window.
blit(picA, screen, 0,0,0,0,324,330);
|
Listing 2 begins by declaring a pointer variable named picA capable of pointing to a BITMAP.