Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:07:26+00:00 2026-06-13T05:07:26+00:00

I am trying to use an existing Bitmap image on a C# windows form

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:07:27+00:00Added an answer on June 13, 2026 at 5:07 am
    ColorPalette palette = originalBitmap.Palette;
    Color first = palette.Entries[0];
    for (int i = 0; i < (palette.Entries.Length - 1); i++)
    {
        palette.Entries[i] = palette.Entries[i + 1];
    }
    palette.Entries[(palette.Entries.Length - 1)] = first;
    originalBitmap.Palette = palette;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are trying to build a media sharing site. I want to use existing
I am trying to use existing functionality which is embedded in a asp.net aspx
I am trying to use an existing SQL CE 4 database in my windows
I am trying to use JAXB's introspection to marshall and unmashall some existing domain
I'm trying to use ThreadLocal to provide thread safety to pre-existing non-thread-safe classes, but
I've been trying to use smart pointers to upgrade an existing app, and I'm
I'm trying to use mezzanine's overextends tag to both override and extends the existing
I'm trying to use Node.js to create a zip file from an existing folder,
I'm trying to convert my existing site to use WCF to communicate with my
I am trying to modify an existing MySQL database for use in a new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.