- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
static void Main(string[] args)
{
    int count = 4096;
    int w = int.MaxValue / count;
    int h = 10;
    int argb = 0;
    Directory.CreateDirectory("test");
    for (int bj = 0; bj < count; ++bj)
    {
        Console.WriteLine("Processing bitmap #{0} of {1}...\t{2,3}%",
                          bj + 1, count, (int)(100f * ((float)(bj + 1) / (float)count)));
        using (Bitmap bmp = new Bitmap(w, h))
        {
            Console.Write("Done   0%");
            using (Graphics gr = Graphics.FromImage(bmp))
                for (int x = 0; x < w; ++x, argb++)
                {
                     gr.DrawLine(new Pen(Color.FromArgb(argb)), x, 0, x, h);
                     Console.Write("\b\b\b\b{0,3}%", (int)(100f * ((float)(x + 1) / (float)w)));
                }
                Console.Write("\nSaving bitmap...\n{0}", new string('-', 80));
                bmp.Save(string.Format("test\\#{0}.bmp", bj + 1), ImageFormat.Bmp);
        }
    }
}