标签:mfile pen rom from ima 打开图片 summary return draw
/// <summary>
/// 打开图片,仅支持jpg
/// </summary>
private Image OpenImage(string imagePath)
{
if (!File.Exists(imagePath))
{
return null;
}
string extension = System.IO.Path.GetExtension(imagePath);
string pExten =extension.ToUpper();//转成大大写的格式来判断
if (pExten.Equals(".JPG"))
{
Image pImage = System.Drawing.Image.FromFile(imagePath);
return pImage;
}
else
return null;
}
标签:mfile pen rom from ima 打开图片 summary return draw
原文地址:http://www.cnblogs.com/lzh5d/p/7902816.html