关于循环中保存 [英] About saving while in loop

查看:63
本文介绍了关于循环中保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我在循环中有这段代码,当我尝试保存图像时,它返回给我,并显示有关GDI +的错误

这是我的代码

>

hi all

i have this code inside my loop and while i try to save the images, it returns to me with an error about GDI+

here's my code

           

color:red> i 0 < { DrawLines.DrawLine(Pens.BlueViolet,0,i,tehPic.Width,i);
/td>
//垂直画线
drawLines.DrawLine(Pens.BlueViolet,i,0,i,tehPic.Height);
Text.Replace(.bmp",.jpeg"),System.Drawing.Imaging.ImageFormat.Jpeg);
color:red> a 图片
tehPic.Image
线程.睡眠(1000);
                 for(i=0; i <=tehPic.Height ; i++) 
            { 
                //the horizontal drawline 
                drawLines.DrawLine(Pens.BlueViolet,0,i,tehPic.Width,i); 
 
                //the vertical drawline 
                drawLines.DrawLine(Pens.BlueViolet, i, 0, i, tehPic.Height); 
                 
                imageToFilter.Save(fileLocation.Text.Replace(".bmp", ".jpeg"), System.Drawing.Imaging.ImageFormat.Jpeg); 
 
                Image a = Image.FromStream(File.Open(fileLocation.Text.Replace(".bmp", ".jpeg"), FileMode.Open)); 
                tehPic.Image = a; 
 
                Thread.Sleep(1000); 
            } 

推荐答案

是什么实际的错误消息?
What is the actual error message?


这篇关于关于循环中保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆