请教:C#快速重绘加载图像抖动问题

tanjunjian123 tanjunjian123 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
主要加载绘图在下面,加载图像是大尺寸图像,每次只加载一部分,图像最终展示出往前推进的效果。目前方法抖动,并且速度缓慢。大神们,有无好的解决方法。
string ludisk = string.Format("D:\\11\\0101.jpg");
Stream s = File.Open(ludisk, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
//imgL = Image.FromStream(s);
imgL = Bitmap.FromStream(s);
s.Dispose();

bit = (Bitmap)imgL;

label1.Text = bit.Width.ToString() + "____" + bit.Height.ToString();

GraphicsUnit units = GraphicsUnit.Pixel; //单位设置成像素

Bitmap bmpVoltage1 = new Bitmap(Width - 50, Height);
Graphics gVoltage1 = Graphics.FromImage(bmpVoltage1);

for (int i = 0; i < 5000; i = i + 1)
{
srect = new Rectangle(i, 00, 2000, 1080);

//gVoltage1.DrawImage(bit,rect,i,0,2000,1080, units);
gVoltage1.DrawImage(bit, 0, 0, srect, units);
//gVoltage1.DrawImage(bit, drect, srect, units);
pictureBox.Image = bmpVoltage1;
pictureBox.Update();
pictureBox.Invalidate();
}
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
tanjunjian123
C# 111,128 成员 642,537 内容