I read a single pixel out of an image using the following code:
private void CheckArea(Point where)
{
Bitmap test = (Bitmap)PanelToBitmap(panel2);
var pixel = test.GetPixel(where.X, where.Y);
}
I want to change the color of this pixel. First I tried to convert it into an image but that doesn’t work. Then I tried to change the ARGB-values, but they are write-protected.
How can I change the color of a pixel in an image given a Point?
you can use :
msdn
Color is an immutable structure, so you can’t change its values.