Below is my code:
private double GetImageValue(Bitmap Image)
{
double ImageValue = 0;
for (int X = 0; X < Image.Width; X++)
{
for (int Y = 0; Y < Image.Height; Y++)
{
Color CurrentPixel = Image.GetPixel(X, Y);
ImageValue += CurrentPixel.A + CurrentPixel.B + CurrentPixel.G + CurrentPixel.R;
}
}
return ImageValue;
}
The code returns the total value of each pixel in the image. Is there a way to speed up the procedure?