Tuesday, March 6, 2012
3:14 PM

A new twist to PIConvert

Some time ago I shared a small and simple bash script that was helping me mass manipulate images. Its main purpose was to help me convert all the screenshots I had for my review articles into JPG format, including a thumbnail for each. However, it didn't take long before I started adding features, such as converting to sepia and B&N, resizing to Blackberry and iPhone screen resolution, etc.

I created PIConvert under GNOME initially, using zenity and imagemagick as the foundation for my script. The script was quickly put together and so the code was far from neat and tidy. Moreover, I realised there was a strong zenity dependency, which not all KDE distros would necessarily support since they already include kdialog. As a result, I decided to revisit my script, strip down some of the unnecessary complexity, improve comments for easier understanding and get it to work with kdialog.


Click on image to enlarge

In the screenshot above you can see how I added PIConvert to the favorites section of my menu. After clicking on the launcher, the following menu appears:



The idea for the most part is that regardless of the option chosen, PIConvert will ask for a few files to convert, as shown below.



Once selected, it will ask for a location to convert them to, again shown below.



Finally, the script exits nicely when done.


Click on image to enlarge

Easy enough, right?

I am happy with the end result because this version of PIConvert now works perfectly natively under KDE, plus the code is simpler and easier to understand. If you are interested in using this version of PIConvert, simply download the script from HERE, review the code to ensure it is safe (always do this whenever you download any kind of code you don't trust!), then grant execution rights and give it a go!

Note that this version of PIConvert depends on imagemagick (it uses the convert command) and obviously kdialog.

0 comments:

Post a Comment