Monday, June 6, 2011

PiConvert updated!

Not long ago I POSTED about the wonderful imagemagick command, which provides image manipulation capabilities through a command line interface. As I described back then, when I write reviews, I usually take lots of screenshots to provide visual context, all of which are generated as PNG images by default. In the past, I used to manually convert all of those images into JPG format to reduce their size, but I also had to manually create thumbnails for all of them... Quite tedious, if you ask me.

Using the extremely flexible and powerful imagemagick command, I created a script to automate some of the most common image manipulation activities I do. Originally, only converted PNG files into JPG, creating the corresponding thumbnails in the process. Since I completed the first version, though, I kept adding options based on my needs and now this simple script does a number of interesting things.

All available options are depicted in the screenshot below, which incidentally is the menu that shows up when the script runs.


An interesting piece of functionality that I often use when an artistic vein kicks in, converting color pictures to black and white is also one of the most popular image conversions available. Unfortunately, imagemagick conversion is not the smoothest I have seen, but I wanted to make it available anyways.

A simple example of how a sample color image is turned to black and white using


Converting color images to Sepia tones is another one of my favorites. In this case, imagemagick manages it better, and with the right setting, results look great.

For this example, I used the latest Fedora 15 default wallpaper, whose intense blue color makes the conversion to sepia stand out.


When I find cool wallpapers for my PCs, it doesn't take long before they end up in either my iPod4 or BlackBerry 9700. I thought could help me save some time there, so I added two new options to cover my needs there.

NOTE: The iPhone default screen resolution is a bit difficult to achieve with landscape wallpapers, so while I find a good way to do it, I am simply squeezing pictures to fit in. Not perfect, I know...

NOTE 2: I know, I know, code is anything but fancy, but I can hardly find any time to keep adding options. At some point I hope I will find time to optimize my code and remove any redundancies. For now, I just concentrate on getting it to do what it was designed to do, it is a very simple script after all...


If you like and would like to use it, you can download it from HERE