What is the best way to set the RGB components of every pixel in a System.Drawing.Bitmap
to a single, solid color? If possible, I'd like to avoid manually looping through each pixel to do this.
Note: I want to keep the same alpha component from the original bitmap. I only want to change the RGB values.
I looked into using a ColorMatrix
or ColorMap
, but I couldn't find any way to set all pixels to a specific given color with either approach.