I am trying to use an existing Bitmap image on a C# windows form which is a rendered MandleBrot Fractal. I want to implement colour cycling. It must be done with with the use of a pallete image. Here is my code I am stuck for days now and can't get it to work. The code must be inside the timer method.
 private void timer1_Tick(object sender, EventArgs e)
    {
                   Bitmap bitmap2 = new Bitmap(640, 480,PixelFormat.Format8bppIndexed);
        ColorPalette palette = bitmap2.Palette;
        for (int i = 0; i < 256; i += 3)
        {
            Color b = new Color(); 
            b = Color.FromArgb(i);
            bitmap2.Palette.Entries.SetValue(b, i);
           //b = Color.FromArgb(palette[i], palette[i + 1], palette[i + 2]);
           // bitmap.Palette.Entries.SetValue(b, i);
            //bitmap.Palette = palette;
        } 
        mandelbrot();
    }
The original image is called bitmap and the palette needs to be bitmap2. Thanks