public static Bitmap drawDiagonal(Image srcImage) { Bitmap newBmp = (Bitmap)srcImage; for (int x = 0; x < newBmp.Width; x++) { int y = (x * newBmp.Height) / newBmp.Width; newBmp.SetPixel(x, y, Color.Black); } return newBmp; }