June 02, 2007
Automatic Server-Side Image Scaling and Thumbnails (ASSIST!)
Shrink to 200 pixels wide - side-by-side with a browser-scaled image for comparison:
Shrink to 200 pixels tall:
Fit inside a box 100 pixels square, keeping proportions:
Resize to 100 pixels square, regardless of proportions:
Accessing this directly from HTML:
<img src="/images/Benten.jpg?size=200x" border="0" />
This is intended to make it easy to produce image galleries and photo albums where you need to produce images in multiple resolutions. Also, it will be used for user avatars: Since mee.nu users have complete control over their site layouts, there won't be a single fixed size for avatars, and resizing in the browser produces ugly images.
The advantages (apart from the improved quality) is that it makes it very easy to keep the image proportions, and it produces smaller files for fast loading times. (And less strain on your bandwidth.) Doing high-quality image processing is fairly CPU intensive, but we already have 16 CPUs at our disposal, so that is not anticipated to be a problem.
One hitch: This doesn't currently work for animated GIFs. Neither does the image processing function in the file module; the GIF library I'm using is lacking in several respects. This will be resolved in the next month or so.
I just found the coolest image function on this blog.
When you click on the image (the first one, of the guy creeping along), see how the image pops to full size and the background goes black.
Any way we can copy that?
Posted by: Michael Rittenhouse at July 04, 2007 02:26 AM (q4Tbt)
Posted by: Pixy Misa at July 04, 2007 01:44 PM (PiXy!)
32 queries taking 0.0081 seconds, 54 records returned.
Powered by Minx 1.1.6c-pink.