getting image from a picturebox

后端 未结 3 814
情歌与酒
情歌与酒 2020-12-22 04:45

how can i get an image that i drawn on a picturebox? in my application i created a form with the freehand drawing.but i can\'t save the image that i drawn as a file,there ha

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-22 05:36

    I tried a similar operation.

    pictureBox1.Image.Save("C:\\tempStack.jpg", ImageFormat.Jpeg);
    

    The cause could be that the pictureBox1 (very unlikely) or pictureBox1.Image is not set.

    Use

    pictureBox1.Load("")
    

    to load the image before trying to save it.

提交回复
热议问题