manipulating an image file in asp.net with C#

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

I've got a file upload happening to upload an image file
to the server. During this process I want to also create a
thumbnail of the image in the same directory, and adjust
the size of the image if it's too large horizonally or
vertically. I am using an httpfilescollection to gain
access to the file I uploaded, but I can't figure out
where to go from there.

Since this is in ASP.net I'm out of luck with the graphics
class in GDI+.

Any suggestions?
 
Will said:
I've got a file upload happening to upload an image file
to the server. During this process I want to also create a
thumbnail of the image in the same directory, and adjust
the size of the image if it's too large horizonally or
vertically. I am using an httpfilescollection to gain
access to the file I uploaded, but I can't figure out
where to go from there.

Since this is in ASP.net I'm out of luck with the graphics
class in GDI+.

Any suggestions?

There are plenty of samples of this to be found on the net.

E.g.
http://www.aspalliance.com/chrisg/tools/view-image3.asp

Custom controls with this functionality can be found at:
http://www.asp.net/ControlGallery/default.aspx?Category=8&tabindex=2

Also try Google with the keywords "asp.net" and "thumbnails".
 
Why exactly can't you use GDI+ on a server? It's actually easier then on the
client side as you have complete control over the server (and can guarantee
that .NET framework and GDI+ is installed).

Jerry
 
Back
Top