static void Main(string[] args)
{
Bitmap bitmap = new Bitmap(400, 400, PixelFormat.Format24bppRgb);
using(Graphics gr = Graphics.FromImage(bitmap))
{
using(Pen pen = new Pen(Color.Red,2))
{
gr.DrawLine(pen,100,100,300,300);
}
bitmap.Save(@"D:\temp.jpg",ImageFormat.Jpeg);
}
Console.ReadLine();
}
С уважением, Вячеслав