Other Color Space Manipulations

Having a whole huge matrix for alpha blending alone seems like overkill, until you realize that any manipulation of the color space is possible with such a tool, if only you knew what numbers to plumb in. The technique of manipulating such a matrix for the purpose of changing the color space is called recoloring and is also easy to do with GDI+. Once again, the tool used is the ColorMatrix and the vehicle is the ImageAttributes. Unfortunately, there are no methods on the ColorMatrix to perform color space rotations, but they would be possible, given the correct settings of the linear part of the matrix. As an exercise, you could send in a modification of Listing 3.5.10 to sams@netedgesoftware.com that does color ...

Get C# and the .NET Framework: The C++ Perspective 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.