User Tools

Site Tools


doc:appunti:linux:gimp_batch

This is an old revision of the document!


Batch processing of images with GIMP

I had a set of many scanned images from magazine pages, the sizes were varying and I wanted to apply the GIMP erode filter to enhance the text readability. Generally for image batch processing I use Imagemagick from the command line, but I was not able to reproduce the erode filter with Imagemagick, so I searched the recipe to do batch processing with the GIMP.

The erode filter

You can apply the erode filter in GIMP from menu FiltersGenericErode. There is no dialog box to control the filter parameters, but it turned out that when you want to call the plug-in-erode function from a script you have to pass several parameters.

To inspect the required parameters go to menu FiltersScript-FuConsoleBrowse. Here you are into the Script-Fu Procedure Browser and you can search for the plug-in-erode procedure. For each parameter you have the type (e.g. float or integer) and a brief description:

  • run-mode
  • image
  • drawable
  • propagate-mode
  • propagating-channel
  • propagating-rate
  • direction-mask
  • lower-limit
  • upper-limit

It is not simple to have an explanation of each paramter, so I proceeded by trials. It turned out that the wanted result is obtaiuned by passing propagate-mode = O:white. I set to zero the other parameters too.

doc/appunti/linux/gimp_batch.1669220292.txt.gz · Last modified: 2022/11/23 17:18 by niccolo