View Single Post
Old August 25th, 2004, 03:42 AM
brettk_1 brettk_1 is offline
Authorized User
Join Date: Aug 2004
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts

Hi all,

Incase it is of any use, here is the code I use to resize and save the image:

Dim aFile As HttpPostedFile = Me.myFile.PostedFile

Dim fileName As String = Path.GetFileName(aFile.FileName)

Dim imgStream As Stream = aFile.InputStream()

Dim img_New As System.Drawing.Image = System.Drawing.Image.FromStream(imgStream)

Dim imgOutput As New System.Drawing.Bitmap(img_New,800,600)

imgOutput.Save(Server.MapPath(".") & fileName)

As I said, using this method seems to increase the file size.

Any help is appreciated.