我做的思路是这样的:将本地一个文件夹的图片读出来, string[] pics = System.IO.Directory.GetFiles( _path);
byte[] byte_pic;
foreach (string f in pics)
{
if (System.IO.File.Exists(f))
{
byte_pic = System.IO.File.ReadAllBytes(f);
}
this.dataGridView1.Rows.Add(new object[] { byte_pic });//添加行
}
可是这样加进去的图片总是原图显示,无法控制大小。
有什么办法可以在datagridview中控制大小的显示图片呢。
byte[] byte_pic;
foreach (string f in pics)
{
if (System.IO.File.Exists(f))
{
byte_pic = System.IO.File.ReadAllBytes(f);
}
this.dataGridView1.Rows.Add(new object[] { byte_pic });//添加行
}
可是这样加进去的图片总是原图显示,无法控制大小。
有什么办法可以在datagridview中控制大小的显示图片呢。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货