private void ResizeLogos(PromotionProductDto promotionProductDto) { string logoFileName = System.IO.Path.Combine(AppSettingsUtils.GetStringAppSetting("PromotionProductBlobImagesTempDirectory"), promotionProductDto.Logo); UploadFileHandler.ResizeFromStreamImage(logoFileName, promotionProductDto.Logo, new ImageInformation { Width = AppSettingsUtils.GetDimensionWidth("PromotionProductImagesNormalDimension"), Height = AppSettingsUtils.GetDimensionHeight("PromotionProductImagesNormalDimension"), BlobDirectoryName = AppSettingsUtils.GetStringAppSetting("PromotionProductBlobImagesNormalDirectory") }); UploadFileHandler.ResizeFromStreamImage(logoFileName, promotionProductDto.Logo, new ImageInformation { Width = AppSettingsUtils.GetDimensionWidth("PromotionProductImagesThumbnailsDimension"), Height = AppSettingsUtils.GetDimensionHeight("PromotionProductImagesThumbnailsDimension"), BlobDirectoryName = AppSettingsUtils.GetStringAppSetting("PromotionProductBlobImagesThumbnailsDirectory") }); UploadFileHandler.ResizeFromStreamImage(logoFileName, promotionProductDto.Logo, new ImageInformation { Width = AppSettingsUtils.GetDimensionWidth("PromotionProductImagesPreviewDimension"), Height = AppSettingsUtils.GetDimensionHeight("PromotionProductImagesPreviewDimension"), BlobDirectoryName = AppSettingsUtils.GetStringAppSetting("PromotionProductBlobImagesPreviewDirectory") }); }
private void ResizeLogo(CompanyLogoDto companyLogo, bool isLogo) { string logoFileName = System.IO.Path.Combine(AppSettingsUtils.GetStringAppSetting("CompanyImagesBlobTempDirectory"), companyLogo.Logo); if (isLogo) { UploadFileHandler.ResizeFromStreamImage(logoFileName, companyLogo.Logo, new ImageInformation { Width = AppSettingsUtils.GetDimensionWidth("CompanyImagesLogoDimension"), Height = AppSettingsUtils.GetDimensionHeight("CompanyImagesLogoDimension"), BlobDirectoryName = AppSettingsUtils.GetStringAppSetting("CompanyImagesBlobLogoDirectory") }); return; } UploadFileHandler.ResizeFromStreamImage(logoFileName, companyLogo.Logo, new ImageInformation { Width = AppSettingsUtils.GetDimensionWidth("CompanyImagesNormalDimension"), Height = AppSettingsUtils.GetDimensionHeight("CompanyImagesNormalDimension"), BlobDirectoryName = AppSettingsUtils.GetStringAppSetting("CompanyImagesBlobNormalDirectory") }); UploadFileHandler.ResizeFromStreamImage(logoFileName, companyLogo.Logo, new ImageInformation { Width = AppSettingsUtils.GetDimensionWidth("CompanyImagesThumbnailsDimension"), Height = AppSettingsUtils.GetDimensionHeight("CompanyImagesThumbnailsDimension"), BlobDirectoryName = AppSettingsUtils.GetStringAppSetting("CompanyImagesBlobThumbnailsDirectory") }); UploadFileHandler.ResizeFromStreamImage(logoFileName, companyLogo.Logo, new ImageInformation { Width = AppSettingsUtils.GetDimensionWidth("CompanyImagesPreviewDimension"), Height = AppSettingsUtils.GetDimensionHeight("CompanyImagesPreviewDimension"), BlobDirectoryName = AppSettingsUtils.GetStringAppSetting("CompanyImagesBlobPreviewDirectory") }); }