C# 在picturebox背景图片上画线并保存下来的图片上背景是黑色没有图片怎么办?

2025-03-09 10:53:31
推荐回答(1个)
回答1:

Image myimage = new Bitmap(pictureBox1.Width, pictureBox1.Height);

这里你的myimage只是一个与picbox宽高相等的新的空白图片。如果你想要picbox中的图片就需要这么写。
Image myimage=picbox.image;//picbox需要已经有图片