Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resizing images automatically in code

Status
Not open for further replies.

glyn6

Programmer
Nov 2, 2009
561
GB
I'm after some way of automatically resizing an uploaded image in asp.net so I get a thumbnail and the original. I've tried a few ways which all had awful results and the general answer seems to be "use PHP code to do it as it does it well" which isn't much help
 
It depends on how you you are doing the resizing, but sometimes rotating the image twice means that you end up with a better quality image. Have a read through this article to see what I mean and whether it applies to how you are creating your thumbnails:


Mark,

Darlington Web Design[tab]|[tab]Experts, Information, Ideas & Knowledge[tab]|[tab]ASP.NET Tips & Tricks
 
what have you tried so far that has failed?
the first thing I would try is Image.GetThumbnail(...).

you may also get more help posting in your language of choice. resizing images is independent of the asp.net or webforms. it's just part of the .net framework. whether you are using vb, c# or another language; asking in those forums may provide better results.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
GetThumbnail can provide relatively poor quality thumbnails if a thumbnail is not already embedded in the image (which is presumably part of the reason for the original post)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top