byte[] getImageByte = HttpHelper.getImageByte(HttpContext.Current.Server.MapPath(("~/UploadFiles/StuImgs/" + result_Model.StuImage)));
if (getImageByte != null)
{
student.StuImage = result_Model.StuImage;
student.pic_data = Convert.ToBase64String(getImageByte);
}
else
{
student.StuImage = "";//图片找不到
}
转载于:https://www.cnblogs.com/muxueyuan/p/5274523.html