求助弱问题,picture.load后image.save的问题
PictureBox3.Load(Application.StartupPath & "\Image\1.bmp")
PictureBox3.Image.Save(Application.StartupPath & "\Image\1.jpeg", Imaging.ImageFormat.Jpeg)
会提示保存有问题,搜了一下,有人说load的不是前景图,那应该怎么写呢
我用
PictureBox3.Image = Image.FromFile(Application.StartupPath & "\Image\1.bmp")
但1.bmp又被占用了,我修改不了图片。啥办,求助高手
[解决办法]
放置被占用,直接加载后释放
Image img= Image.FromFile(Application.StartupPath & "\Image\1.bmp");
PictureBox3.Image =img.Clone() as Image;
img.Dispose();
[解决办法]
最好用LoadAsync异步加载