/// <summary>
/// 将照片转化为byte[]
/// </summary>
/// <param name="strFile"></param>
/// <returns></returns>
public static byte[] GetBytesByImagePath(string strFile)
{
byte[] photo_byte = null;
using (FileStream fs = new FileStream(strFile, FileMode.Open, FileAccess.Read))
{
using (BinaryReader br = new BinaryReader(fs))
{
photo_byte = br.ReadBytes((int)fs.Length);
}
}
return photo_byte;
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。