public static Bitmap DrawGradientImage(int w, int h, Color startColor) { Bitmap bitmap = new Bitmap(w, h); for (int y = 0; y < h; y++) { int argb = startColor.ToArgb(); for (int x = 0; x < w; x++) { Color c = Color.FromArgb(argb); bitmap.SetPixel(x, y, c); argb++; // Change color for next pixel } } return bitmap; }