Home All Groups Group Topic Archive Search About

Opposite of Graphics.FromImage

Author
16 May 2006 10:50 AM
news.microsoft.com
Hello,

can I do the opposite of:
Dim newGraphics As Graphics = Graphics.FromImage(imageFile)

I want an image from a graphics.

thx.

Author
16 May 2006 1:07 PM
Chris Dunaway
With a Graphics object, you can call it's various Draw methods to draw
lines, arcs, rectangles, circles, etc.  Then save what you have drawn
to an image.

Could you be more specific about what you wish to do?

Chris
Author
16 May 2006 1:09 PM
Herfried K. Wagner [MVP]
"news.microsoft.com" <Yves_no_spam@hotmail.com> schrieb:
> can I do the opposite of:
> Dim newGraphics As Graphics = Graphics.FromImage(imageFile)
>
> I want an image from a graphics.

A 'Graphics' object is mainly a tool used to access a device (image, screen,
printer, ...), so it is not possible to create an 'Image' object from a
'Graphics' object.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
16 May 2006 4:41 PM
Ken Tucker [MVP]
Hi,

         VS 2005 added drawtobitmap method to the controls.
http://msdn2.microsoft.com/en-us/library/ms158401(VS.80).aspx

Ken
------------------

Show quoteHide quote
"news.microsoft.com" wrote:

> Hello,
>
> can I do the opposite of:
> Dim newGraphics As Graphics = Graphics.FromImage(imageFile)
>
> I want an image from a graphics.
>
> thx.
>
>
>