vb.net upload image resize only

Vetrijar

Regular
Joined
Sep 1, 2003
Messages
55
Location
Texas
I'm trying to find a way to resize an image uploaded through the WebPostedFile object. The ones on the web I'm finding are PHP, or script based. Are there any that are plain vb.net programming ? The one I found which didn't work yet was

System.Drawing.Image

using that I tried.
dim uploadimage as system.drawing.image
dim resizeimage as system.drawing.image

UploadImage.FromStream(file1.PostedFile.InputStream) Resizemage = UploadImage.GetThumbnailImage(100, 200, Nothing, Nothing)
ResizeImage.Save("mypicture1.jpg")

I get the error.
Object reference not set to an instance of an object

The NEW command doesn't work for this dim statement either :-(
 
Back
Top