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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...