Resize Image!!

A

Adam J Knight

Hi all,

I am trying resize an image using the following code.

//resize image
System.Drawing.Image ImageUpload =
System.Drawing.Image.FromFile(String.Concat(Server.MapPath(FilePath),ImageName));

// create the actual thumbnail image
System.Drawing.Image ThumbnailImage =
ImageUpload.GetThumbnailImage(250,ImageUpload.Height * 250 /
ImageUpload.Width, new
System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback),
IntPtr.Zero);
ThumbnailImage.Save(ImageName)); //ie: test.jpg

However i keep getting this error:
Exception Details: System.Runtime.InteropServices.ExternalException: A
generic error occurred in GDI+.

Any one have any ideas?
Cheers,
Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top