private void bt_saveImage_Click(object sender, System.EventArgs e)
{
using (Bitmap printImage = new Bitmap(tlp.Width, tlp.Height))
{
tlp.DrawToBitmap(printImage, new Rectangle(0, 0, printImage.Width, printImage.Height));
printImage.Save( "C:/image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg);
}
throw new System.NotImplementedException();
}
我有错误说“ExternalException是unhanlered; GDI +中发生了一般错误。”上
"printImage.Save( "C:/image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg)
“
感谢您的帮助!
答案 0 :(得分:0)
在“C:\ image.jpg”之前使用@
printImage.Save( @"C:\image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg)
或强>
在位置
中使用“\\”printImage.Save( "C:\\image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg)