O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

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

8.3. Color Mapping Using Color Objects

The System.Drawing.Imaging namespace provides three color objects that can be used to apply color mappings to images. These three objects are ColorMap, ColorMatrix, and ColorPalette. In this section we will discuss the use and importance of these objects.

8.3.1. The Color Remap Table

A color remap table is used to convert the existing colors of an image to new colors by applying a color mapping to them. The ColorMap class represents a color remap table. It defines the mapping between existing colors and the new colors to which they will be converted. When the map is applied to an image, any pixel of the old color is converted to the new color.

The ColorMap class has only two properties—NewColor and OldColor ...

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