System.Drawing question

Q

Qwert

Hello,

I want to draw from one System.Drawing.Bitmap to another. All I can find is
how to draw to a Graphics object.
System.Drawing, System.Drawing.Drawing2D or System.Drawing.Imaging have no
functionality for this.

"The Graphics class provides methods for drawing to the display device."
But I want to draw to an 'off-screen' image.

How does one do this?

Thank you.
 
G

Guest

Check out Graphics.FromImage. You can create a Graphics object from a
bitmap, draw on it, then save it as a bitmap or display it in a picturebox,
etc.
 
H

Herfried K. Wagner [MVP]

Qwert said:
I want to draw from one System.Drawing.Bitmap to another. All I can find
is how to draw to a Graphics object.

\\\
Dim bmp As New Bitmap(...)
Dim g As Graphics = Graphics.FromImage(bmp)
g.DrawImage(...)
....
g.Dispose()
....
///
 
Q

Qwert

Thank you both, just what I need.

I was looking wrong, assuming the image or bitmap class would provide the
functionality to copy from one image to another.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top