Jump to content
Software FX Community

What are in memory bit maps?


SarahBenjamin

Recommended Posts

Thanks for responding to my post.

I want to save the chart as a bit map image and then want to use it in the bitmap object. Dont know how to do that. I have code till here

MemoryStream objMemoryStream = new MemoryStream();

OuterChart.Export(ChartFX.WebForms.

FileFormat.Png, objMemoryStream);

Now I want to use it somehow like this

Bitmap bmp = new Bitmap(objMemoryStream....

But I dont know how to grab the image back from the memory stream. I want to use the image of chart for graphics purposes.

Thanks for your help.

-Sarah

Link to comment
Share on other sites

Oh I see. I feel stupid now! I didn't realize you meant Bitmap int the System.Drawing context, I thought you meant some kind of strange chart that plots bits in a map.

Here is the code you need:

MemoryStream objMemoryStream = new MemoryStream();

OuterChart.Export(ChartFX.WebForms.

FileFormat.Png, objMemoryStream);

...

// Later 

Bitmap bmp = (Bitmap) Bitmap.FromStream(objMemoryStream);

// Now you have the chart in an Bitmap object.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...