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 ...

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.