Image Viewer/Resizer
There have been times I wanted to post a link to an image on a web page, forum, or elsewhere on the web but I didn't want to manually resize a large image everytime and store duplicates. Instead, I coded this simple tool to take a single image and resize it on the fly.
It starts with a thumbnail preview of all images and subdirectories. Clicking an image will display at full size. You can add querystring parameters to resize. Provide "w=400" to set the width to 400 pixels and keep aspect. Provide "h=350" to set the height and keep aspect. Provide both to override aspect, or also provide "resize=limit" to keep aspect and constrain image to fit the width and height. e.g. ...viewer.cgi/River.jpg?w=400&h=350&resize=limit
Written in Perl/CGI and uses ImageMagick for image manipulation.
Why Perl/CGI? Why not PHP, ASP.NET, etc.? My web hosting account is based on Linux and provides Perl, which despite PHP's dominance in the mainstream, I personally feel is a better platform for application development than PHP. Perl still receives a broad spectrum of support both in publication and on the web. My provider uses the FastCGI Apache module to make CGI applications as fast as possible by keeping the program loaded into memory for repeated accesses, much like other mainstream web platforms.
About Shawn Poulson / Exploding Coder
Software developer and designer
I'm a software developer in the Philadelphia/Baltimore metro area that loves web technology and creating compelling and useful applications. This blog was created to showcase some of my ideas and share my passion and experiences with others in the same field. Read more...