Batch Processing
Advanced Compositing & Retouching
Chapter 7 · Batch Processing
Chapter 6 covered creating a Photoshop Action or a GIMP Script-Fu script capable of performing a sequence of steps automatically. This chapter covers the other half of real production automation: running that Action or script against hundreds of files unattended, with no manual per-file intervention at all — the actual task a working retoucher reaches for automation to solve in the first place.
Photoshop's Batch Command
File > Automate > Batch takes a previously-recorded Action and a source folder, and runs that Action against every file in the folder automatically. It offers options for handling anything the Action recorded that needs adapting per run — overriding "Open" and "Save" steps so files read from and write to the correct folders rather than the exact paths that happened to be open while recording, and choosing how to handle a recorded "Stop" (skip it, or still pause for each file). For the specific, extremely common case of resizing and re-saving a batch of files in a new format, Photoshop also offers a more specialized dialog — the Image Processor (File > Scripts > Image Processor) — which handles that one task directly without needing to build a custom Action first.
GIMP's Batch Mode
GIMP's batch mechanism works completely differently at a technical level: GIMP can be launched from the command line with a -b (batch) flag, passing Script-Fu code directly as a command-line argument, processing files without ever opening its normal graphical window at all. This isn't "the GUI app running against a folder" the way Photoshop's Batch command is — it's GIMP running headless, purely as a processing engine driven entirely by code.
A real production script wraps this same logic in a loop over every file in a source folder, rather than hard-coding one filename as shown above for clarity. GIMP additionally offers Python-Fu as a second scripting language option alongside Script-Fu — the same underlying GIMP Procedure Database, but callable from ordinary Python syntax instead of Scheme's prefix notation. It's worth flagging honestly here, since Chapter 6 covered Script-Fu specifically: Python-Fu is a genuinely more approachable entry point for anyone already comfortable with Python, and many real-world GIMP batch scripts are written in it rather than Script-Fu for exactly that reason.
A Real Production Task: Resize & Watermark Hundreds of Images
A common real job: an e-commerce client provides a folder of several hundred raw product photos, each needing resizing to a consistent dimension, a semi-transparent logo watermark composited into a corner, and saving into an output folder under a consistent naming scheme — all without manually opening each file. Both tools solve this the same way in principle: build and test the sequence on one file first (resize, composite watermark layer at reduced opacity, flatten, export), then apply that proven sequence across the whole folder via Photoshop's Batch/Image Processor or a GIMP batch-mode loop.
| Aspect | Photoshop | GIMP |
|---|---|---|
| Mechanism | Batch command runs the GUI app against a folder | Command-line batch mode runs headless, no GUI at all |
| Common resize/convert shortcut | Image Processor (dedicated dialog) | No dedicated dialog — written as a script |
| Scripting language options | N/A (uses recorded Actions) | Script-Fu (Scheme) or Python-Fu (Python) |
| Runs without a display | No — Batch still drives the visible application | Yes — genuinely headless via -i -b |
Hands-On Exercises
Explain the specific mechanical difference between how Photoshop's Batch command runs an Action across a folder and how GIMP's command-line batch mode runs a script across a folder.
📄 View solutionA GIMP user who already knows Python well but has never learned Scheme wants to write a batch script. Using this chapter's own material, explain what option they have, and why it's a genuinely more approachable choice for them specifically.
📄 View solutionA batch script resizes and watermarks 400 product photos overnight. The next morning, three of the 400 output files are blank or wrong, with no error message anywhere. Using this chapter's own warning box, explain why this likely happened and what should have been built into the script to catch it.
📄 View solutionChapter 7 Quick Reference
- Photoshop: File > Automate > Batch runs a recorded Action against a folder; Image Processor is a dedicated shortcut for resize/convert jobs
- GIMP: command-line
gimp -i -b '(...)'runs headless, with no GUI at all — a genuinely different mechanism, not just a different menu - GIMP offers Python-Fu as an alternative to Script-Fu — same PDB, ordinary Python syntax instead of Scheme
- Always test a batch operation on a small representative subset before running the full folder
- Batch processing multiplies Chapter 6's silent-failure risk — production scripts need explicit error handling and logging, not just the happy-path sequence