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

  • Home
  • SEARCH
  • 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 9049241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:20:51+00:00 2026-06-16T12:20:51+00:00

I have 2 Images, OriginalImage and TempImage . I use this code to load

  • 0

I have 2 Images, OriginalImage and TempImage.

I use this code to load Image in form:

this.DoubleBuffered = true;
Temp= new Bitmap(2, 2);
Original = new Bitmap(2, 2);
Original=Temp;

and change the Temp image(Rotate,Crop,etc)

When reset, I load the Original Image to load Elementary image in form but load the Temp image.

  • 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-16T12:20:55+00:00Added an answer on June 16, 2026 at 12:20 pm

    The issue is that Bitmap is a class, and when you say Original = Temp, you’re telling Original to reference the same Bitmap instance as Temp.

    The Bitmap that you instantiated for Original is lost and will be garbage collected, and if you dispose either one, both will stop working.

    What you’re looking for in that last line is Bitmap.Clone(), so that you create a copy of Temp and store that in Original:

        this.DoubleBuffered = true;
        Temp= new Bitmap(2, 2);
        Original = (Bitmap)Temp.Clone();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this code running to load my images all asynch and show a
I have this code: public Image toNegative() { int imageWidth = originalImage.getWidth(); int imageHeight
I have the following code that I use to resize some images on my
I have an image stored on my server in this folder: \images\freemedia\largethumbs\test.png On my
I have an example string as follows $string = ' http://image.gsfc.nasa.gov/image/image_launch_a5.jpg http://pierre.chachatelier.fr/programmation/images/mozodojo-original-image.jpg http://image.gsfc.nasa.gov/image/image_launch_a5.jpg Alot
This is the code I have, it actually works, not perfectly but it does,
So I need lightbox 2 to have a maximum image width to resize images
I have this method for shrinking down an image for a website that I'm
I have to import a large amount of image crops off of many images
I have the following code, which I sourced at http://dolcepixel.com/how-to-watermark-all-your-uploaded-images/ I need to modify

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.