Link to home
Create AccountLog in
Avatar of rrhandle8
rrhandle8Flag for United States of America

asked on

Resize images to best possible quality

I am resizing images using the code below.  I don't really understand all the different settings for System.Drawing.Drawing2D, so I thought I would post my question here.

Using System.Drawing.Drawing2D, what settings will give me the best quality output?
Dim ofinalImage As System.Drawing.Image = New Bitmap(newWidth, newHeight)
            Dim graphic As Graphics = Graphics.FromImage(ofinalImage)
            graphic.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality
            graphic.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
            graphic.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic

Open in new window

Avatar of Kumaraswamy R
Kumaraswamy R
Flag of India image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account