我用DrawImage去拼图,可是出来的存在间隙,而且图片变得不清晰了,下面是代码,大侠帮我看看原因:
...
Bitmap bmpMap = new Bitmap(this.Width, this.Height);
Graphics gra = Graphics.FromImage(bmpMap);
for (int i = 0; i < m_Rows; i++)
{
for (int j = 0; j < m_Cols; j++)
{
int top = i * m_BlockHeight;
int left = j * m_BlockWidth;
gra.DrawImage(bmp, left, top);
}
}
this.Image = bmpMap;
this.Refresh();
...
...
Bitmap bmpMap = new Bitmap(this.Width, this.Height);
Graphics gra = Graphics.FromImage(bmpMap);
for (int i = 0; i < m_Rows; i++)
{
for (int j = 0; j < m_Cols; j++)
{
int top = i * m_BlockHeight;
int left = j * m_BlockWidth;
gra.DrawImage(bmp, left, top);
}
}
this.Image = bmpMap;
this.Refresh();
...
解决方案 »
- C#中怎样把byte数组转换成数字
- 请教一个C#获取数值的问题~!!
- 在windows窗体程序菜单设计中,实现点击工具栏button后,再次点击不打开已出现的form
- 压缩 JPG
- 有关抽象类的问题?有没有办法在重载一个抽像类的方法的时候返回一个自定义类.
- 关于printPreviewControl1 打印预览 高手请进
- 从Socket中异步高速读取数据时,收到的部分数据包不完整
- Visula Studio.net 2003 安装问题
- 如何在文本框中删除光标的前一个字符,是能连续删除的
- 设计界面
- C#写的一个垂直搜索/反向索引!程序不打算升级!提供国大家研究
- 帮帮我! 如何用控件写 保存 和 打开,装载文档的代码
ASP.NET画图全攻略