public static Photo ReadImage(string ImageFilePath)

{
//设置图片私有变量和属性。
Photo photo = new Photo();
//读取图片文件
photo.TheImage = System.Drawing.Image.FromFile(ImageFilePath);
//图片文件大小
photo.ImageLength = new FileInfo(ImageFilePath).Length;
photo.ImageFileName = GetFileName(ImageFilePath);
photo.ImageType = GetFileExtName(ImageFilePath);
//删除原文件
File.Delete(ImageFilePath);
return Photo;
}
photo.TheImage = System.Drawing.Image.FromFile(ImageFilePath);
public static Photo ReadImage(string ImageFilePath)

{
//设置图片私有变量和属性。
Photo photo = new Photo();
FileStream fs = new FileStream(ImageFilePath, FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] bytes=br.ReadBytes((int)fs.Length);
br.Close();
fs.Close();
MemoryStream ms = new MemoryStream(bytes);
photo.TheImage = System.Drawing.Image.FromStream(ms);
photo.ImageLength = new FileInfo(ImageFilePath).Length;
photo.ImageFileName = GetFileName(ImageFilePath);
photo.ImageType = GetFileExtName(ImageFilePath);
File.Delete(ImageFilePath);
return Photo;
}