7.5. Working with Bitmaps

A bitmap stores data for an image and its attributes in pixel format. The Bitmap class, which is inherited from the Image class, encapsulates a graphics bitmap in GDI+. Because the Bitmap class is inherited from the Image class, it offers all the methods and properties that we discussed in the previous section. The Bitmap class defines additional functionality. In this section we will learn about the members of the Bitmap class and how to use them.

7.5.1. Creating a Bitmap Object

The Bitmap class provides about a dozen overloaded forms of the constructors. You can create a Bitmap object from a bitmap file, or from Image, Stream, string, or Type objects. When you create a Bitmap object, you can also specify the size ...

Get Graphics Programming with GDI+ 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.