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,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top