Author: Pmillio | Posted on: 12/6/2009 10:23:45 AM | Views : 355

Hi i have the following which uploads an image, however for some reason it does not resize it and reduce the kb size; here is my code can anyone see what i am doing wrong;
System.Drawing.Image imgFullImage =System.Drawing.Image.FromFile(Server.MapPath(strProfileFilePath + intUserID.ToString() + strFileExt)); int intProfileImgWidth = Convert.ToInt32(Math.Round((Convert.ToDouble(0.07)) * imgFullImage.Width)); int intProfileImgHeight = Convert.ToInt32(Math.Round((Convert.ToDouble(0.07)) * imgFullImage.Height)); Bitmap imgProfileBitmap = new Bitmap(intProfileImgWidth, intProfileImgHeight); Graphics imgProfileGraph = Graphics.FromImage(imgProfileBitmap); imgProfileGraph.CompositingQuality = CompositingQuality.HighQuality; imgProfileGraph.SmoothingMode = SmoothingMode.HighQuality; imgProfileGraph.InterpolationMode = InterpolationMode.HighQ ...

Go to the complete details ...