Phatch is an Open Source Python program running on Mac OS, Linux, and Windows. The name comes from the combination of Photo and Batch, because this is a processor of photographs built around the slogan, “one click is worth a thousand photos.” In my opinion, the combination of some very useful features and the fact that Phatch is cross-platform make it a very interesting tool for anyone who needs to consistently format many pictures on a regular basis. This includes photographers, of course, but also many small businesses and organizations with similar requirements: I’m thinking of eBay merchants, real estate or travel agencies, schools, or any business that needs to create online photo galleries. In all such cases, Phatch greatly facilitates the preparation of those pictures for publication in a consistent, almost automatic, way.

How Phatch works

Installing Phatch is easy. On Linux there are binary packages for Archlinux, Debian, Fedora, OpenSUSE, and Ubuntu. Even on other platforms the procedure is simple, as long as you have Python already installed. The Phatch community has an active forum and Wiki, with plenty of tutorials and other documentation.

Before going into photo processing, please note, in Figures A and B, how easy it is to use Phatch to analyze existing pictures: open the Image Inspector tool, drop any image in its window and you’ll see all the corresponding metadata.

Figure A

Figure B

When it comes to processing, Phatch works by actions lists. There are many tens of predefined actions, as shown in Figure C.

The one I like the most is the “geek” action, that tells Phatch to execute external commands, thus greatly extending its capabilities. One built-in example of what I mean is the preconfigured action that uses Blender to place pictures on 3D objects. Other actions I like are, in no particular order:

  • configurable renaming
  • lossless JPEG rotation, cropping and rescaling
  • addition of backgrounds, watermarks, configurable borders or text in any position
  • saving or deleting metadata
  • geotagging and timestamp shifting
  • conversion to many formats, including PDF, normal or encapsulated PostScript
  • filtering of files to process according to (among other things) name, type, timestamp or metadata

To create an actions list you must click on the + Button and then select all the actions you want (Figure C), configuring their options to suit your needs (Figure D).

Figure D

You may even create your own actions. Once you are done, save the list with a meaningful name and you’re ready to work. From now on, every time you’ll need to perform all the actions of that list on all the pictures in a hierarchy of folders you’ll only have to:

  • open Phatch
  • select the actions list you need from the predefined library or from your one (Tools-> Browse Library)
  • click on “Execute”
  • select the folder with the original pictures and set the self-explaining options in the panel of Figure E
  • click on “Batch”

Figure E

Figure F shows, side by side, a gallery of original pictures and, on the left, the copies (with borders, text and everything) generated by Phatch with the actions list of Figure D.

Figure F

Phatch makes building these reusable actions lists really easy and fun. About the only thing you need to figure out by yourself is the proper order of the actions, at least if you care about maximizing performance. If, for example, you wanted solarized thumbnails with watermarks, it would be faster to create the much smaller files first and do all the work on them, rather than doing the opposite.

The last action of a list should always be a “Save”, and Phatch will add it for you if you forget it. Besides, by default Phatch does not overwrite existing files. In practice, you are free to try different versions of the same actions list to figure out what is the most efficient, and you really should do it, before actually adding a list to your library.

Teamwork and command line usage

Phatch is already very useful as it is in the figures of this post — that is, as a GUI tool. What makes it even more interesting though is the format of its actions lists, and the possibility to run at the command line. Phatch lists are saved as plain text files, normally in $HOME/.local/share/phatch/actionlists/, in this format:

  #> more .local/share/phatch/actionlists/default.phatch
  {'actions': [{'fields': {'Amount': u'100',
                           'Method': 'Orientation',
                           '__enabled__': 'yes'},
                'label': 'Transpose'},
               {'fields': {'Amount': u'100',
                           'Cutoff': u'0',
                           '__enabled__': 'yes'},
                'label': 'Auto Contrast'},
               {'fields': {'Border Width': u'1   px',
                           'Bottom': '0px',
                           'Color': '#000000',
                           'Left': '0px',
                           'Method': 'Equal for all sides',
                           'Opacity': u'100',
                           'Right': '0px',
                           'Top': '0px',
                           '__enabled__': 'yes'},
                'label': 'Border'},

Such a simple format means that different Phatch users can easily exchange lists, regardless of what operating system they run. Besides, as I said, you can run Phatch unattended, inside any script, with this simple syntax:


$ACTION is the full path of the Phatch actions list file and $FOLDER is the folder containing the pictures to be processed.

Have you already seen where I’m going? With Phatch, all the members of a team can have all their pictures processed in the same way every day, almost without effort. Even if they don’t run Phatch themselves! All they need to do is to upload their raw pictures to a common folder on some server. Then a cron job running every hour would process the pictures with actions lists prepared, once and for all, by one member of the team. Even if that person is not a geek at all, and wouldn’t touch a command prompt with a ten-foot pole. Convenient, isn’t it?