Re: From Graphics to Image
Fabian Schmied <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
> Graphics g = Graphics.FromImage(b); > > Then you should be able to use "g" to draw your graph on "b", and then use > b.Save() to save the result, or g.DrawImage() to paint the image on the > screen. The first part is right, but if "g" is the Graphics object obtained via Graphics.FromImage(b), then g.DrawImage won't paint the image on the screen. Instead, it can be used to paint a different image on the graphics object (which in turn paints on "b"). To show the image on the screen, you can use a PictureBox or a Paint event's PaintEventArgs.Graphics.DrawImage(). Fabian