How to convert Image to Graphic?
You can't convert a Graphics
object into an image, as the Graphics
object doesn't contain any image data.
The Graphics
object is just a tool used to draw on a canvas. That canvas is typically a Bitmap
object or the screen.
If the Graphics
object is used for drawing on a Bitmap
, then you already have the image. If the Graphics
object is used for drawing on the screen, you would have to make a screen shot to get an image of the canvas.
If the Graphics
object was created from a window control, you could use the control's DrawToBitmap
method to render the control on an image instead of on the screen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With