Classic ASP Image Resizer
Classic ASP script which uses a .NET Image resizer. JPG, PNG, GIF and BMP images are resized on the fly by the Resize_Image.aspx file using the following QueryString values:
- ImgWd - IMaGe WiDth - The required width of the image. Optional: Exclude to scale with height.
- ImgHt - IMaGe HeighT - The required height of the image. Optional: Exclude to scale with width.
- CrpYN - CRoP Yes / No - Should the image be cropped or aspect ratio maintained (even if padding is required)? Optional: If excluded, default value is "N".
- PadCl - PAD CoLour - Pass a HTML hex value (minus the hash #) to be used as the background colour when padding images. Optional: If excluded and padding is required, default value is "ffffff" i.e. white.
- IptFl - InPut FiLe - The relative path and filename of the image to be resized e.g. image.jpg, folder/image.jpg, /folder/image.jpg.
- OptFl - OutPuT FiLe - The relative path and filename to save the resulting image to. Optional: Exclude to just display on screen.
- OptSc - OutPuT to SCreen - Should the resulting image be returned to the screen. Optional: If excluded, default value is "Y".
- SplEf - SPeciaL EfFect - Add a special effect to your image using SplEf=X. Optional: Options as follows: "1" Black and White "2" GreyScale "3" Sepia
IMPORTANT - If you wish to use the OptFl option, you will need to uncomment the relevant lines in the aspx file. See the security advice at the top of the file for details.
Relative Resize (Width / Height)

ImgWd=800&IptFl=Input.jpg

ImgHt=225&IptFl=Input.jpg
Fixed Resize (Cropped / Padded / Coloured Padding)

ImgWd=400&ImgHt=400&IptFl=Input.jpg&CrpYN=Y

ImgWd=400&ImgHt=400&IptFl=Input.jpg

ImgWd=400&ImgHt=400&IptFl=Input.jpg&PadCl=ff0000
Special Effects (Black & White / Greyscale / Sepia)

ImgWd=300&IptFl=Input.jpg&SplEf=1

ImgWd=300&IptFl=Input.jpg&SplEf=2

ImgWd=300&IptFl=Input.jpg&SplEf=3
Output (Screen Only / Screen & File / File Only)

ImgWd=400&IptFl=Input.jpg

ImgWd=300&IptFl=Input.jpg&OptFl=Thumb.jpg

ImgWd=1024&IptFl=Input.jpg&OptFl=Gallery.jpg&OptSc=N
Credits
This solution was originally developed by Pieter Cooreman, QuickerSite (Classic ASP Website CMS). It was adapted and republished by David Barton, EasierThan Website Design via EasierThan (Official Blog).
The script is offered freely and no liability is accepted by either party for any issues arising from the downloading, installing or use of it.
If you find the script useful, backlinks and / or a beer (see original ASP Image Resizer page) would be much appreciated, but are not necessary.