编程论坛
注册
登录
编程论坛
→
C# 论坛
怎么读取出TIFF图片 (130M左右),当做背景图使用的 求大神支招 谢谢
溟风涯
发布于 2015-11-21 17:30, 1357 次点击
怎么读取出TIFF图片 (130M左右),当做背景图使用的 求大神支招 谢谢
2 回复
#2
溟风涯
2015-11-23 10:52
string impath = @"f:\1.tif";
FileStream myfs = File.OpenRead(impath);
byte[] B_Read = new byte[myfs.Length];
myfs.Read(B_Read, 0, B_Read.Length);
myfs.Close();
Bitmap resultBitmap;
try
{
using (MemoryStream ImageMS = new MemoryStream())
{
ImageMS.Write(B_Read,0, B_Read.Length);
resultBitmap = new Bitmap(ImageMS);
}
}
catch
{
resultBitmap=null;
}
pictureBox1.Image = resultBitmap;
#3
溟风涯
2015-11-23 10:56
为什么图片太大就读不出来
1