In my asp.net application I want to re-size some Images to small dimension, say 75*75 and I want to do it without loosing the image quality. Currently I am using Image re-sizing using Bitmap and the code snippet is given below.
System.Drawing.Image oldImg= System.Drawing.Image.FromFile(Filepath);
Bitmap newImg = new Bitmap(75, 75, PixelFormat.Format24bppRgb);
Graphics g= Graphics.FromImage(newImg);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
g.DrawImage(oldImg, new Rectangle(new Point(0, 0), newSize));
newImg.Save(Filepath, ImageFormat.Jpeg);
But doing like this, the new image appears blurry. can I get the good image without any blurs using this methods by making any modification or is there any other method to re-size the original image to specified dimension without loosing the quality.