Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 :-(

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...