O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bitmaps and Metafile

The .NET Framework makes it very easy to work with images of various sorts. The System.Drawing namespace has the abstract class Image that provides functionality for derived classes such as Bitmap and Metafile. A bitmap stores an image as an array of pixels. A metafile stores an image as a set of drawing commands.

Drawing an Image

The shared method FromFile in the Image class creates an image from a file whose file name is specified by a string. The DrawImage and DrawImageUnscaled methods of the Graphics class can be used to draw an image onto a drawing surface specified by a Graphics object.

The program BitmapDemo illustrates ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required