Esempio n. 1
0
        public PostImageController(IAdImageServices adImageServices)
        {
            if (adImageServices == null)
                throw new ArgumentNullException("adImageServices");

            _adImageServices = adImageServices;
            _postImagesFilePath = Path.Combine(HostingEnvironment.ApplicationPhysicalPath, "Content", "PostImages");

            // Set the default resizing settings once and for all
            _postImageResizeSettings = new ResizeSettings();
            _postImageResizeSettings.MaxWidth = 600;
            _postImageResizeSettings.MaxHeight = 400;
            _postImageResizeSettings.Format = "jpg";
            _postImageResizeSettings.Mode = FitMode.Max;

            _postImageThumbnailResizeSettings = new ResizeSettings();
            _postImageThumbnailResizeSettings.MaxWidth = 160;
            _postImageThumbnailResizeSettings.Height = 120;
            _postImageThumbnailResizeSettings.Format = "jpg";
            _postImageThumbnailResizeSettings.Mode = FitMode.Max;
        }
Esempio n. 2
0
        public PostImageController(IAdImageServices adImageServices)
        {
            if (adImageServices == null)
            {
                throw new ArgumentNullException("adImageServices");
            }

            _adImageServices    = adImageServices;
            _postImagesFilePath = Path.Combine(HostingEnvironment.ApplicationPhysicalPath, "Content", "PostImages");

            // Set the default resizing settings once and for all
            _postImageResizeSettings           = new ResizeSettings();
            _postImageResizeSettings.MaxWidth  = 600;
            _postImageResizeSettings.MaxHeight = 400;
            _postImageResizeSettings.Format    = "jpg";
            _postImageResizeSettings.Mode      = FitMode.Max;

            _postImageThumbnailResizeSettings          = new ResizeSettings();
            _postImageThumbnailResizeSettings.MaxWidth = 160;
            _postImageThumbnailResizeSettings.Height   = 120;
            _postImageThumbnailResizeSettings.Format   = "jpg";
            _postImageThumbnailResizeSettings.Mode     = FitMode.Max;
        }