1

Does anyone have a past experience on implementing a complete image manipulation solution in classical ASP? I need a solution where a user can:

  1. Upload an image
  2. The uploded image is stored on the filesystem (inside or outside wwwroot)
  3. The image is displayed in the browser but it is resized... on-demand

The on-demand resizing is my main problem. In PHP I could use phpThumb library that allows me to specify a filename and max width/height in a query string. The library resizes the images accordingly, in addition, it caches the copy of the image so that next time the same image with same width/height is requested it is served from the cache.

Can I implement such a solution in classical ASP, if possible with open-source components? ImageMagick?

Salman A
  • 262,204
  • 82
  • 430
  • 521

3 Answers3

3

It would appear that ImageMagick has a COM+ component that can be used for this purpose.

Another mature (though I don't think it's free) library that's commonly used for this is AspJpeg.

David
  • 208,112
  • 36
  • 198
  • 279
1

This post is a little old, but we recently faced the same issues regarding resizing via Classic ASP.

We found a solution which used the VB.NET route, but it didn't do everything we wanted so we adapted it to include features to resize, crop, pad (with colour) and display the resulting jpg out to the screen and / or a file.

We've uploaded our efforts here in a zip file with the script and an example asp file with instructions: http://easierthan.blogspot.co.uk/2013/02/code-tip-3-classic-asp-image-resizer.html

With regards to uploading, we used http://www.freeaspupload.net which seemed to work very well.

EasierThan
  • 11
  • 1
1

ASP.net has build-in functions to manipulate images, since most servers serving ASP classic have some version of ASP.net installed, you can rely on it to do the work.

ie:

<img src="resize.aspx?file=/gallery/photo1.jpg&w=300&height=400" />
Eduardo Molteni
  • 38,786
  • 23
  • 141
  • 206
  • Can you suggest an stand-alone open source ASP.Net script that does not require application/session and allows resizing+caching? – Salman A Dec 29 '10 at 06:41
  • This question http://stackoverflow.com/questions/2808887/create-thumbnail-image-in-c has the answers. You can write the file to disk for caching. – Eduardo Molteni Dec 29 '10 at 14:40