winform 的datagridview控件中控制图片的大小
我做的思路是这样的:将本地一个文件夹的图片读出来,
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中控制大小的显示图片呢。