Author: TheLomex | Posted on: 4/5/2004 10:37:42 PM | Views : 418

I'm building an app where the user can upload an image and the app will resize the image to the appropriate size. When this happens, once the image gets resized, the image quality degrates and looks crappy... Can anybody help me out?

MY CODE

'comes from a popup box where user selects the file
Dim img As System.Drawing.Image = System.Drawing.Image.FromStream(.InputStream)
Dim imageFormat = img.RawFormat

Dim thumbSize As New Size
thumbSize = NewthumbSize(img.Width, img.Height)
Dim imgOutput As New Bitmap(img, thumbSize.Width, thumbSize.Height)
imgOutput.Save(Path.Combine(Server.MapPath("../photo/images"), fileName), imageFormat)




'this function finds the correct multiplier to resize the image
Function NewthumbSize(ByVal currentwidth, ByVal currentheight)
Dim tempMultiplier As Double
'check to see if image i ...

Go to the complete details ...