Get and process a new image

The code in Listing 4:

By destroying the existing bitmap before setting the video mode:

Listing 4. Get and process a new image.
  destroy_bitmap(picA);
  set_gfx_mode(GFX_AUTODETECT_WINDOWED,
               windowWidth,
               windowHeight,
               0,
               0);
  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,width,height);