/// <summary> /// 即时生成缩略图 /// </summary> /// <param name="originalImagePath">原始图片路径</param> /// <param name="thumbnailPath">水印图片路径</param> /// <param name="size">图片大小</param> public static void BuilderThumbnail(string originalImagePath, string thumbnailPath, ThumbnailSize size) { WebThumbnailImage.BuilderThumbnails(originalImagePath, thumbnailPath, size.Width, size.Height, size.Mode, size.AddWaterMarker, size.WaterMarkerPosition, size.WaterMarkerPath, size.Quality); }
/// <summary> /// 即时生成缩略图 /// </summary> /// <param name="originalImagePath">原始图片路径</param> /// <param name="thumbnailPath">水印图片路径</param> /// <param name="size">图片大小</param> public static void MakeThumbnail(string originalImagePath, string thumbnailPath, ThumbnailSize size) { try { WebThumbnailImage.MakeThumbnail(originalImagePath, thumbnailPath, size.Width, size.Height, size.Mode, size.AddWaterMarker, size.WaterMarkerPosition, size.WaterMarkerPath, size.Quality); } catch (Exception ex) { throw new FrameworkException(string.Format("生成失败,非标准图片:{0}", thumbnailPath), ex); } }