Tuesday, March 30, 2010

How to convert multiple images (command line)

Using Imagemagick, it is very easy.

Say we have a bunch of bmp files we want to convert to png. This hack assumes a couple of things:
1. The picture files end with bmp. On Linux and other unixy OSes, this is important. Not so important on Windows.
2. The mogrify command alters the original file so you may want to back up your files before doing this. :)

So with the disclaimer behind us, here's the command:

mogrify -format png *.bmp


Edit:
So I'm not sure why mogrify is behaving this way, but I just tried in on my Opensuse 11.1 with Imagemagick version 6.4.3 and the files were not mogrified. Instead of overwriting the file, a new file with a png extension was created. Which makes sense now that I think about it. :)

Link-o-rama for March 30, 2010

1. Warner Bros recruiting students to spy on other kids for downloading.
2. Open standards in Europe under attack.
3. Gaiking trailer!
4. On the serious side, 9 alleged cyberbullies (and real life bullies) charged in court for causing young girl's suicide.

Tuesday, March 23, 2010

cmake - stopping the automake/autotools/autoconf insanity

In the process of researching an opensource library, I came across cmake. At this point, cmake looks very promising. I will be writing a series of tutorials on cmake but in the meantime, check out a tool (used by the brilliant people at KDE) written in Ruby that converts projects that use automake/autotools/autoconf to cmake.