怎么读取出TIFF图片 (130M左右),当做背景图使用的 求大神支招 谢谢
怎么读取出TIFF图片 (130M左右),当做背景图使用的 求大神支招 谢谢
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;