Exemple #1
0
        /// <summary>
        /// 缩略图的生成
        /// </summary>
        private void PushThumbnail()
        {
            //根据ID查询出缩略的方式
            Int32  ItemID    = WebHelper.GetIntParam(Request, "ID", 0);
            Int32  Width     = WebHelper.GetIntParam(Request, "width", 200);
            Int32  height    = WebHelper.GetIntParam(Request, "height", 200);
            String Mode      = WebHelper.GetStringParam(Request, "mode", "AUTO");
            String PhotoType = WebHelper.GetStringParam(Request, "Type", "p").ToLower();

            String ImagePath = MapPath(String.Format("{0}/Resource/images/no_image.png", TemplateSourceDirectory));



            if (ItemID > 0)
            {
                DNNGo_DNNGalleryProGame_Slider ContentItem = DNNGo_DNNGalleryProGame_Slider.FindByID(ItemID);
                if (ContentItem != null && ContentItem.ID > 0)
                {
                    //if (PhotoType == "p")
                    //    ImagePath = ViewLinkUrl(ContentItem.Picture, ContentItem.PortalId);
                    //else
                    //    ImagePath = ViewLinkUrl(ContentItem.Thumbnails, ContentItem.PortalId);
                }
            }
            GenerateThumbnail.PushThumbnail(Server.UrlDecode(ImagePath), Width, height, Mode);
        }