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 6609187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:41:20+00:00 2026-05-25T19:41:20+00:00

i dont have a problem with binding a bitmapimage to image tag in codebehind

  • 0

i dont have a problem with binding a bitmapimage to image tag in codebehind for eg.

BitmapImage image = new BitmapImage();
imagetaginxaml.Source = image; // this will remove whatever image is currently on the image tag in xaml and attach the empty bitmapimage above

but i’m not able to get the image by doing the reverse, for example, i want to process the image that is currently on the image tag. i am not able to do this

BitmapImage image = imagetaginxaml.Source;

what should i do

  • 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-05-25T19:41:21+00:00Added an answer on May 25, 2026 at 7:41 pm

    How about using WriteableBitmap to make a copy of the image, and then using a MemoryStream to copy the original image into a copy?

    // Create a WriteableBitmap from the Image control
    WriteableBitmap bmp = new WriteableBitmap(imagetaginxaml, null);
    
    // Load the contents of a MemoryStream from the WritableBitmap
    MemoryStream m = new MemoryStream();
    bmp.SaveJpeg(m, bmp.PixelWidth, bmp.PixelHeight, 0, 100);
    
    // Read from the stream into a new BitmapImage object
    m.Position = 0;
    BitmapImage image = new BitmapImage();
    image.SetSource(m);
    
    // do something with the new BitmapImage object
    // (for example, load another image control)
    anotherimagetaginxaml.Source = image;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with adding image to DGV cell after data binding. this is
I have a problem with the Ninject. My binding rules: this.Bind<ISphinxQLServer>().To<SQLServer>(); this.Bind<IMySQLServer>().To<SQLServer>(); this.Bind<ISQLLogger>().To<StandardSQLLogger>() .InRequestScope();
I have deployed a new build on Production server, but I dont see the
I have found this example on StackOverflow: var people = new List<Person> { new
I have a problem that is driving me mad, and I just dont seem
I have problem and i don't know how to solve this simple, i have
Hello I have a problem with a binding that I want to do and
I have a listbox template showing an image and three textboxes. You will see
One problem that I come across regularly and yet don't have a solution to
I have a problem drawing something quickly in .NET. I don't think that any

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.