This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Tools & Utilities

Batch process photos with Phatch

By Dmitri Popov on May 01, 2008 (4:00:00 PM)

Share    Print    Comments   

Virtually any photo manager lets you perform mundane tasks like adjusting contrast, adding a watermark, and applying effects to your photos. But even powerful applications like digiKam and F-Spot can't really help you when you need to perform the same action (or a sequence of actions) on dozens or hundreds of photos. For that you need a batch processing utility like Phatch. This nifty tool can perform no fewer than 35 different actions on your photos, and its user-friendly graphical interface makes it easy to create advanced multistep batch rules.

If you are using Ubuntu, installing Phatch is as easy as downloading its .deb package and double-clicking on it. A source tarball is also available. If you want to be able to view EXIF and IPTC data, you should also install the python-pyexiv2 package, and for "cool Nautilus integration" Phatch's Web site recommends installing the python-nautilus package.

Unlike conventional image editing applications, Phatch doesn't allow you to edit photos directly -- instead, you use it to set up actions. An action in Phatch is a single operation that the application performs on the photos that are fed into it. Each action offers a number of options: for example, the Scale action allows you to specify the width and height, resolution, and resampling algorithm. You can add as many actions as you like. The project's wiki provides a list of all the actions supported by the Phatch.

To add an action to Phatch, press the Add Action button and select the desired action from the list. You can narrow the list to a specific action type by selecting a category from the Select drop-down list. Alternatively, you can use the Search feature to search for a particular action.

As an example, choose the Scale action and press the Add button. This adds the selected action to the main window. You can then use the available options to tweak the action. For the Scale action, for example, you can choose to scale down the photo by a specified percentage value or to a predefined size measured in pixels. If you wish to change the image resolution or resampling algorithm, you can do so by adjusting the appropriate options. Once you are satisfied with the settings, you can add other desired actions. Finally, you have to add the mandatory Save action; without it, Phatch wouldn't know where to save the processed photos. Besides options such as output format and quality, the Save action also offers a set of variables that you can use to specify a destination for the processed photos. For example, the default folder_phatch/subfolder variable tells Phatch to save the processed images in a separate folder inside the source directory. The root/phatch/year/month/day variable creates a directory structure based on the current date.

You can rearrange the actions in the list using drag and drop -- except for the Save action, which must always be the last action on the list.

To process photos using the created action list, press the Execute button, choose the directory containing the photos you want to process, and press the Batch button. Once Phatch finishes, you should see the processed photos in the destination directory.

While using the Execute command every time you want to run photos through Phatch is not that difficult, the application offers another feature that makes the batch process even more straightforward. Choose View -> Droplet, and Phatch turns into a floating icon. Drag photos onto it, and Phatch processes them using the currently opened action list.

Although Phatch is first and foremost a GUI tool, you can run it from the command line, so you can automate the batch execution and turn your computer into a batch photo processing server. You can find a detailed description of how to do this at Phatch's wiki.

Dmitri Popov is a freelance writer whose articles have appeared in Russian, British, US, German, and Danish computer magazines.

Share    Print    Comments   

Comments

on Batch process photos with Phatch

Note: Comments are owned by the poster. We are not responsible for their content.

Batch process photos with Phatch

Posted by: Anonymous [ip: 198.207.0.5] on May 01, 2008 05:32 PM
Nice article, but no comparison to ImageMagick? I found this on the Phatch FAQ:

"Phatch and imagemagick basically have the same purpose, but have a different user experience. Imagemagick is command-line based and Phatch has a Graphical User Interface (GUI). As such Phatch is much more simple to use and also makes it more easy to create complex actions and handle subdirectories. As Phatch is developed with the Python Image Library, writing plugins is a breeze as Phatch generates the GUI automatically."

It'd be nice to have an objective point of view though. I've never used Phatch and my experience with ImageMagick is minimal (but very good), but I'd guess that Phatch would be preferable if the command line scares you, but ImageMagick is bound to be more mature, stable, and have more options.

#

Batch process photos with Phatch

Posted by: Anonymous [ip: 74.212.17.39] on May 01, 2008 06:24 PM
I've been batch processing graphics with with ImageMagick and shell scripts for a long time - the range things ImageMagick can do are kind of amazing.

One who eschews the fruminous gui

#

Batch process photos with Phatch

Posted by: Anonymous [ip: 62.194.147.195] on May 01, 2008 08:29 PM
Phatch is available in the Ubuntu Hardy and Debian unstable repositories, so you can just do:
sudo apt-get install phatch

For Phatch 0.2 which will appear in october, Phatch will open up its architecture so that external actions can be implemented. This means that Phatch can glue all command-line graphical applications (such as imagemagick, but also HDR imaging, Gimp and even Blender) together in a nice workflow with a gui. BTW the gui is optional. Phatch can run on servers without a gui.

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya