Create Image Thumbnails with ImageMagick
ImageMagick is, for lack of better term, magic. You can throw just about anything at it and succeed. With that in mind, I was recently using Google Page Speed to see how I could improve my website and it occurred to me I wasn't generating thumbnails for my post lists -- I was simply scaling down preview images with CSS. Certainly not the most efficient technique you've ever heard of. ImageMagick to the rescue -- now I can parse for images and generate thumbnails to make my site much faster to download!
ImageMagick is loaded with options but the syntax to generate a thumbnails is dead easy:
convert billboard.png -trim -resize 32x32 thumbnail.png
Instead of simply scaling down an image with CSS, I should be generating a thumbnail and serving that up instead. And since it's so easy to do so, there's really no reason not to!
![Create a CSS Cube]()
CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a language capable of creating deep, creative visuals. Add animation and you've got something really neat. Unfortunately each CSS cube tutorial I've read is a bit...
![5 HTML5 APIs You Didn’t Know Existed]()
When you say or read "HTML5", you half expect exotic dancers and unicorns to walk into the room to the tune of "I'm Sexy and I Know It." Can you blame us though? We watched the fundamental APIs stagnate for so long that a basic feature...
![CSS Selection Styling]()
The goal of CSS is to allow styling of content and structure within a web page. We all know that, right? As CSS revisions arrive, we're provided more opportunity to control. One of the little known styling option available within the browser is text selection styling.
![Event Delegation with MooTools]()
Events play a huge role in JavaScript. I can't name one website I've created in the past two years that hasn't used JavaScript event handling on some level. Ask yourself: how often do I inject elements into the DOM and not add an...
There is a
-thumbnail
option to create, you’ve guessed it, thumbnails : http://www.imagemagick.org/script/command-line-options.php#thumbnailAnd if you need to do it on the fly, here’s a chainable wrapper for GD (PHP): https://github.com/claviska/SimpleImage