Loading and Displaying Images
Now that the main loop for Rubygame is up and running, it's time to put something meaningful on the screen. To do this, you can load images into surfaces. A surface is nothing more than an image in memory. These surfaces can be painted (or "blitted", short for block image transfer) onto other surfaces. and any surface can be painted onto any other surface, including the screen, which itself is a special type of surface. Loading images into surfaces and painting them onto the screen is the primary way of displaying things on the screen in Rubygame.
Before getting started, take a moment to download the example code with the image file required for this article.