Blog Fiasco

May 19, 2009

It’s just like Magick

Filed under: Linux,Web design — Tags: , — bcotton @ 8:42 am

Recently at work, I had to post images from our awards banquet.  With over 100 picutres at nearly 5000×5000, loading that page would take forever.  Clearly, this was a case for Captain Thumbnail.  What’s a thumbnail?  It’s a reduced-size version of an image, according to Wikipedia.  There are two main reasons to use thumbnails.  The first is to make it easier to quickly visually inspect a collection of images.  The second is to reduce the time it takes a page to download and render.

Some people just use HEIGHT and WIDTH in their HTML <img> tags.  That is very naughty.  Using that method doesn’t shrink the data size of the image, so people on slow connections still have to wait for the full image to download.  I learned this when I shared pictures of my first tornado with fellow chasers.  In order to prevent offending the bandwidth of Nealras again, I found a nifty little program called “Media Resizer.”  The free version allows you to resize images, add watermarks, etc.  What the free version does not do is allow you process a batch of images.

Re-sizing an image or two individually isn’t such a big deal.  Making over 100 thumbnails one at a time is the suck.  Knowing the GNU Image Manipulation Program (The GIMP) could resize images, and assuming that it would be scriptable somehow, I began Googling.  What I found instead was a nifty suite of tools collectively known as ImageMagick.

ImageMagick can create thumbnails, sure.  It can add effects, like torn photo edges.  It can convert text to images, or images to different formats.  It can probably do a whole lot more that I haven’t even explored yet.  The best part is that it is easily scriptable, much easier than scripting in The GIMP.  The bester part is that it seems to be included with most Linux distributions.  If you need to do something with an image, especially if you have a bunch of images, think ImageMagick first.  Very helpful examples can be found at: http://www.imagemagick.org/Usage/.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress