Monday, 9 February 2026

A Closer Look at System.Drawing's Bitmap Class

The System namespace is your root namespace for all foundational features in .NET. Primitive types (Int32, String, Boolean) as well as core base classes (Object, Exception) are found here.

The System.Drawing namespace is the home of GDI+ functionality (GDI+ is the enhanced form of the Windows Graphics Device Interface, or GDI, in use since Windows XP i.e. since 2001).

Within this, you have the Bitmap class, which represents a GDI+ bitmap where a bitmap is simply an image defined by pixel data.  The code lives in System.Drawing.Common.dll.

It is a sealed class, which prevents it from being inherited.

If you are missing the relevant package in your .NET project, run the following command in your project directory: 

dotnet add package System.Drawing.Common

(dotnet add package, adds package references to a designated project file, or searches the current directory for one if not specified).

No comments: