I'm in the future. Like hundreds of years in the future. I've been dead for centuries.
Oh, lovely, you're a cheery one aren't you?

Saturday, June 02


It Takes An Image

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:
[thumbnail=/images/Benten.jpg size=200x]

Shrink to 200 pixels tall:
[thumbnail=/images/Benten.jpg size=x200]

Fit inside a box 100 pixels square, keeping proportions:
[thumbnail=/images/Benten.jpg size=100x100]

Resize to 100 pixels square, regardless of proportions:
[thumbnail=/images/Benten.jpg resize=100x100]

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: Pixy Misa at 11:07 PM | Comments (6) | Add Comment | Trackbacks (Suck)
Post contains 220 words, total size 3 kb.

<< Page 1 of 1 >>
38kb generated in CPU 0.0193, elapsed 0.3089 seconds.
51 queries taking 0.3002 seconds, 159 records returned.
Powered by Minx 1.1.6c-pink.
Using https / https://ai.mee.nu / 157