Hesam Qodsi
Hesam Qodsi

Reputation: 1585

Convert graphic that is created on a specific control to Bitmap

How can I convert a graphic, created on a PictureBox, to Bitmap?

Upvotes: 0

Views: 228

Answers (3)

0x49D1
0x49D1

Reputation: 8704

try pictureBox1.Image.Save(..)

Upvotes: 0

SLaks
SLaks

Reputation: 887195

You need to draw directly on a Bitmap object by calling Graphics.FromImage, then set the Bitmap as the PictureBox's Image.

Upvotes: 2

C.Evenhuis
C.Evenhuis

Reputation: 26436

Or if you want to create a Bitmap object:

Bitmap myBitmap = new Bitmap(pictureBox1.Image);

Upvotes: 2

Related Questions