Пример #1
0
 /// <summary>
 /// 创建
 /// </summary>
 /// <param name="FileName">原始图片路径</param>
 public bool SetImage(string FileName)
 {
     srcFileName = QMFile.GetMapPath(FileName);
     try
     {
         srcImage = Image.FromFile(srcFileName);
     }
     catch
     {
         return(false);
     }
     return(true);
 }
Пример #2
0
 /// <summary>
 /// 获取图片缩略图时用到的KEY
 /// </summary>
 /// <param name="aid">附件ID</param>
 /// <param name="width">缩略后的宽度</param>
 /// <param name="height">缩略后的高度</param>
 /// <returns></returns>
 public static string GetKey(int aid, int width, int height)
 {
     return(DES.Encode(aid.ToString() + ",300,300", QMFile.MD5(aid.ToString())).Replace("+", "["));
 }