A simple thumbnail generator (with correct aspect ratio) description
Resizes an image in the browser without throwing off the aspect ratio... basically it makes the image appear smaller, but not stretch the height... also: you dont need to know how wide/high the image is before, just how wide you want it. Someone called into question my reasoning for even using this function, if you can define this information statically in the html, but what the rude person doesnt realize is that if you are displaying hundreds of images in a while or for loop, you need to be able to define this dynamically. So to the responder: _You_ do your research first. --- Please keep in mind, this is not intended for large files, as it is intended for small files of different dimensions. It is meant for uniformed look, not efficient loading.
File List:
A simple thumbnail generator.txt
2Kb
Similar code
Advanced On the Fly button creator
(Popularity: ) : This code will draw a button image based on what you specify for the image properties.