Saturday, June 02
Well, I've uploaded Minx 1.0, so it's time I started playing with some of the new features. Let's see:
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) are 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 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.
Posted by: Steven Den Beste at Sunday, June 03 2007 08:32 AM (+rSRq)
Posted by: Pixy Misa at Sunday, June 03 2007 12:26 PM (PiXy!)
Posted by: Pixy Misa at Sunday, June 03 2007 01:40 PM (PiXy!)
Posted by: Pixy Misa at Sunday, June 03 2007 01:58 PM (PiXy!)
And that only costs us 10% more than the dual-core Opterons we originally budgeted for, while delivering 2.5x the performance.
Also, the image engine automatically switches to a less CPU intensive algorithm for large target sizes. Still higher-quality than browser scaling, of course.
Posted by: Pixy Misa at Sunday, June 03 2007 02:41 PM (PiXy!)
Posted by: Pete Zaitcev at Tuesday, June 05 2007 10:19 AM (9imyF)
51 queries taking 0.0132 seconds, 138 records returned.
Powered by Minx 1.1.6c-pink.