Apr 26
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

I’ve known about ImageMagick tools for quite some time now but never dabbled with it. A couple of weeks ago I played with it for some time (notice the new cascaded polaroid pics header above) and was amazed even more. Few of its shining features:

  • It has almost unlimited features to manipulate your images through its tools like convert, montage, mogrify etc and their long list of options.
  • It is available for Windows, Linux and Mac as well.
  • Runs on web servers also (most of those nifty image sites use it for run time image manipulation)
  • It is amazingly fast.
  • Runs on the command line, which means batching of operations can be done and is also good for butter fingered people like me who are clumsy with GUI based image manipulation programs
  • Has modules for interfacing with C, perl, php, C++, C#, java, etc. So, you can create your own applications around it.
  • It’s FREE (as in speech and as in beer)
  • It has an amazing documentation over at imagemagick.org and also a very thriving community, so help is just a few clicks away.

As a very rudimentary sample of what it can do for you, take a look at my blog’s header above. I just gave it a few pics and ran a command, and it resized them, turned them into polaroid pics, rotated them at random angles, made the background transparent, strung them together to make a webpage header/banner.

Since the command was specific for the number and names of images, I made a simple perl script to automate the command making process so you can also download this script (link at the end of post) and run it to create your own header. (You might want to tweak the $w and $h variables in the script to specify your header’s width and height). Running it would be like

CODE:
  1. ./pano.pl <imagenames>
  2.  
  3. e.g.
  4.  
  5. ./pano.pl myimages/*

After I made this script, I came across Stas Bekman’s photo gallery which has a much better and cool stack effect with photos. And he generously agreed to share his script (much more sophisticated than my my few lines) with me. His script is also attached below.

Polaroid web header Creation Script

Stas Bekman's Image Stacking script

Let me know if you use any of these scripts (as it is or after modifying them) to create any cool effects.


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: Trust no one. Question Everything. - Deus Ex

written by Shantanu Goel \\ tags: , , , , , , , , , , , , , , ,

Feb 12
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

If you have multiple soundcards in your system and have to switch between them regularly (e.g. laptop owners like me, who use an external soundcard while being docked to groove to the highest and the lowest of frequencies through those 7.1 channels and use the in-built sound card while on the move) you would definitely be under-whelmed by the less-than-stellar performance of ubuntu in switching between the sound cards. For me at least, ubuntu (fiesty 7.04 amd64) never seems to recognize that I’ve connected the speakers to my Audigy 2 ZS Notebook PCMCIA card, and merrily continues to huff-puff through the tinny laptop speakers until I manually go into the sound preferences, switch over to multichannel playback and vice versa. Well, I still haven’t found an automated solution for the switching, but here is a little cli-magic to do this in a click.

Continue reading »


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: "The unplanned organism is a question asked by Nature and answered by Death. You are another kind of question, with another kind of answer." -Morpheus

written by Shantanu Goel \\ tags: , , , , , , , , , ,