Batch image processing in GIMP ... with BIMP

Updated: October 12, 2018

I was thinking, BIMP My GIMP, but then, the article title would have been too much like my PIMP My GIMP review, and we don't want that. All right, so GIMP is a very neat, powerful image processing program, with tons of options, filters and plugins. But there's one thing it does not do well - and that's automated operations. You can't really record a set of image processing actions and then repeat them at will.

Or rather, this is doable, but it takes expertise, command line and tears. Instead, in this little guide, I'm going to show you a superior way of performing repetitive bulk actions on your images, which should help shave off a fair amount of time, reduce errors and eliminate tears. The name of the game: BIMP, and so we commence.

Teaser

Installation

I decided to test the tool in Linux ( Kubuntu 18.04 specifically). Windows folks get a separate EXE installer. Linux people will need to compile, because I was not able to find any pre-ready binaries, either in the repos or on the official site. Easier said than done. With GIMP 2.10, I faced a lot of compilation errors, and after a huge amount of time, errors and tears, I gave up trying to setup BIMP with the latest version of the program. With the older 2.8, there were no issues whatsoever.

In more detail, BIMP will complain about missing dev packages, even though I had them installed. I had all the necessary dependencies, added some extra Gtk dev files for good measure, and even installed the full Gnome 3 dev bundle, which tool about 800 MB on the disk. Still no go.

make
Package gegl-0.4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gegl-0.4.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gegl-0.4', required by 'gimp-2.0', not found
No output from 'pkg-config --cflags gimpui-2.0'
which gimptool-2.0 && which pcre-config && \
gcc -o ./bin/bimp -Wall -O2 -Wno-unused-variable -Wno-pointer-sign -Wno-parentheses src/*.c src/manipulation-gui/*.c -lpcre -lm -DGIMP_DISABLE_DEPRECATED
/usr/bin/gimptool-2.0
/usr/bin/pcre-config
src/bimp-gui.c:5:10: fatal error: gtk/gtk.h: No such file or directory
#include <gtk/gtk.h>

I also tried to "fake" it by symlinking Gtk libraries to work around the built-in limitation, but this did not really help either. I did progress slightly in terms of errors and complaints, I started seeing a different file referenced, not just gtk.h but glibconfig.h. No sensible way around this. The compilation just wouldn't run successfully.

sudo ln -s /usr/include/gtk-3.0/* /usr/include
sudo ln -s /usr/include/glib-2.0/* /usr/include

So I removed the PPA version of GIMP (2.10) and compiled against GIMP 2.8 that is available through standard repos. I believe this issue will be solved, but it remains outstanding at the time of this writing. Moreover, this type of error may/will be relevant for future version of GIMP.

BIMP in action

If you've done the job correctly, BIMP will now show in the file menu the next time you launch GIMP.

BIMP in the menu

Launch it. You'll get a simple GUI. The layout isn't hierarchically intuitive, but it gets the job done. Your first task is to load some files. Then, above, in the Manipulation set bar, click on the Add button and select the effect or transformation you want to apply to your previously loaded images. There are several common functions available, like crop, blur, watermark, resize, and others, but you can also load ANY which GIMP procedure.

Add files

Choose action

Watermark, details

As I said, you can select any supported procedure. Another cool thing here is, you actually get the names of these procedures, so if you do want to brave it with Python and alike, you actually know the names of functions that you need to use. This isn't really highlighted anywhere in a simple, obvious way. Each selected procedure will have its own parameters.

Procedures

Procedure details

Let it run. In my case, the actions did take a little bit of time, but the tool finished without errors.

Working

Batch completed

Done

Done, zoomed

Worked just fine. I tried combining multiple effects - and the order DOES make a difference, and there were no issues. I had images grayscaled, changed their brightness and contrast, resized them, added watermarks, and tried a few other tricks. It was all smooth sailing. Nice.

Conclusion

BIMP seems to be a very nice plugin. It offers people without any code love or inclinations with a simple, foolproof method of automating boring repetitive tasks. You really can stack the effects and procedures up and create rather powerful results in a fraction of time it would take you to do so manually. This is a huge time and tears saver.

There is room for improvement. GIMP 2.10 setup, plus I'm not sure there's a way to actually save the current manipulation set so it can be used on another occasion. The option to generate templates would also be really cool. All that said, I'm quite happy with BIMP, and it's an excellent addition to a useful and practical application. Take care, fellow gimpers.

Cheers.

You may also like: