The last time Hackerfall tried to access this page, it returned a not found error. A cached version of the page is below, or click here to continue anyway

pixelmap - ruarai


Bitmap Alternative

The issues associated with editing bitmaps in .NET are not new. The GetPixel and SetPixel methods found in GDI+'s library are simply lackluster, offering extremely poor performance and surprising missing features.

Many solutions to the performance issue go through the route of low level memory management ('lockbits'), an ugly solution that requires unsafe code to be written. Whilst this offers the speed desired, it also adds unnecessary complexity to your code.

PixelMap solves this issue by replacing the Bitmap class entirely, offering a sleeker and faster approach to image manipulation. When an image needs to be converted to or from GDI's Bitmap, the low level memory management is handled out of sight safely.

PixelMap also offers color management in the form of the Pixel class, which gives developers access to color mixing and HSL constructors.

PixelMap is available for download through NuGet or from source on GitHub.

//Quickly load a PixelMap through a Bitmap
PixelMap map = new PixelMap("Lenna.png");
for (int x = 0; x 

Continue reading on