Skip to main content

Posts

Showing posts with the label Resize image and save without saving to temporary file

Resize image and save without saving it to temporary file, C#

Upload an image after resizing to specific size without saving it to temporary file.       ResizeImageAndSave(fileImage.PostedFile.InputStream, Width, Height, FileName);         ///         /// Resize image of Weight X Height and save         ///         public static void ResizeImageAndSave(Stream fs, int intW, int intH, string FileName)         {             System.Drawing.Image objImg = Bitmap.FromStream(fs);             int intImgH = objImg.Height;             int intImgW = objImg.Width;             double R = ((double)intImgW / (double)intImgH);  ...