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;