Пример #1
0
        public static void ResizeImage(string imageFileName, string fileName, AdImageInformation adImageInformation)
        {
            adImageInformation.PhysicalFileName = GetPhysicalFileName(adImageInformation.PhysicalDirectory, fileName);
            ImageResizer imageResizer = new ImageResizer(imageFileName, adImageInformation.PhysicalFileName, adImageInformation.Width, adImageInformation.Height);

            imageResizer.ResizeImage();
        }
Пример #2
0
        public static void ResizeImage(AdImageInformation adImageInformation)
        {
            ImageResizer imageResizer = new ImageResizer(adImageInformation.PhysicalFileName, adImageInformation.PhysicalFileName, adImageInformation.Width, adImageInformation.Height);

            imageResizer.ResizeImage();
        }
Пример #3
0
        public static void SaveAdUploadedImage(HttpPostedFileBase adImage, string fileName, AdImageInformation adImageInformation)
        {
            if (adImage == null)
            {
                return;
            }

            adImageInformation.PhysicalFileName = GetPhysicalFileName(adImageInformation.PhysicalDirectory, fileName);
            adImageInformation.RelativeFileName = GetRelativeFileName(adImageInformation.RelativeDirectory, fileName);

            adImage.SaveAs(adImageInformation.PhysicalFileName);
            ResizeImage(adImageInformation);
        }