Question How to save picturebox's paint function drawings only on bitmap?

thippu

Active member
Joined
Mar 6, 2019
Messages
27
Location
Bangalore
Programming Experience
Beginner
  1. I'm drawing shapes on the PictureBox control using Paint event of it.
  2. May I know how to save drawn shapes only on a bitmap without the picture box image(current).
  3. I don't want to save the PictureBox image.
  4. I have created the bitmap from the image(White background image) for saving a drawing on it.
  5. I want to save it on created bitmap image(4).
code:
Image WhiteBackGroundImage=Image.FromFile("path");//fetching white back ground image.
Bitmap pic=new Bitmap(WhiteBackGroundImage);//creating bitmap
pictureBoxImage.DrawToBitmap(pic,pictureBoxImage.ClientRectangle);
pic.Save("path", ImageFormat.Png);
 
Back
Top Bottom