[英]A generic error occurred in GDI+ exception
I have few rows of VB.NET code: 我有几行VB.NET代码:
Dim dest As String = "C:\Users\Yonapms1\Desktop\Sample Pictures2"
Dim img As Bitmap = New Bitmap("C:\Users\Yonapms1\Desktop\Sample Pictures\Tulips.jpg")
img.Save(dest)
In img.Save(dest) row I get this exception: 在img.Save(dest)行中,我得到以下异常:
Any idea why i get this exeption? 知道为什么我得到这个例外吗?
A generic error occurred in GDI+. GDI +中发生了一般错误。
Thank you in advance. 先感谢您。
It looks like you might be trying to move the image from a folder called "Sample Pictures" to another folder called "Sample Pictures2". 看起来您可能正在尝试将图像从名为“Sample Pictures”的文件夹移动到另一个名为“Sample Pictures2”的文件夹中。 If so, you are better off doing the following: 如果是这样,您最好不要执行以下操作:
File.Move("C:\Users\Yonapms1\Desktop\Sample Pictures\Tulips.jpg", "C:\Users\Yonapms1\Desktop\Sample Pictures2\Tulips.jpg")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.