public static string ThumbUrl(this UrlHelper urlHelper, string fn, string size, WaterMarkingPosition position, ThumbnailMethod mode = ThumbnailMethod.Crop, string defUrl = "")
        {
            if (string.IsNullOrEmpty(fn))
            {
                return(defUrl);
            }
            fn = StringUtility.XBase64Encode(fn);
            var result = urlHelper.GenerateUrl("WaterThumbnail", "Thumb", "Utility", new { size, mode, fn, position });

            return(GetImgSiteFile(result));
        }
        public static string ThumbUrl(this UrlHelper urlHelper, long picId, int width, int height, WaterMarkingPosition position, ThumMode mode = ThumMode.Crop, string defUrl = "")
        {
            if (picId == 0)
            {
                return(defUrl);
            }
            var attaSvc = DependencyResolver.Current.GetService <IAttachmentSvc>();

            return(attaSvc.GetPicUrl(picId, width, height, mode, 100, position));
        }