Sunday, September 19, 2021


MrQ Gimp-Batch

Ver.0.1 (19/09/2021)

Author: MareroQ
Contributors for operations GEGL in Python :

 Kevin Payne & Claude Lion

In menu: Tools -> Batch convert... 

For those who have trouble (or reluctance) to use Console or ImageMagic or you want to use GEGL filters (which the great BIMP does not yet support), this plug-in can make batch processing a little easier without needing to open files as a layers.

Plugin based on the idea of:

- TinTran Run Code on Visible Layers Script for GIMP   & here 


- Saul Goode (Sg-Combine-Bg.scm - popular for animation, watermark or signature).

Be careful of:
- the possibility of losing metadata due to the possibility of using three types of files (bmp, jpg, png - which type opens, it saves it),
- size and type of overlay file (usually png with alpha channel - e.g .: for watermark or signature),
- it is possible to overwrite files (without warning) so try to select "Output Folder" empty,
- for Gegl Recommended for reading: Learn GEGL graph (Gimp Tutorials) by cli345 ->

Example custom code:

# for PDB:

pdb.gimp_image_scale(image, 250, 250)

(comment: scale the image using the default interpolation method. New image width=250   New image height=250) 
pdb.plug_in_autocrop(image ,layer)
(comment: remove empty borders from the image)

# for script-fu: 

pdb.script_fu_fuzzy_border(image ,layer ,(255,255,255),16,1,4,0,100,0,1) 

pdb.script_fu_old_photo(image, layer, 1, 20, 1,0,0)

# for GEGL:     

gegl_batch(image, layer, "cubism");gegl_batch(image, layer, "alien-map") <=or=> gegl_batch(image, layer, "cubism alien-map")

Basic syntax:

gegl_batch(image, layer, 'operations')

List of operations with parameters here.

# for Python:

pdb.python_fu_foggify(image, layer, "", (240,180,70), 1,100);

pdb.gimp_image_merge_visible_layers(image, 0)

 comment: Plugin Fog finishes working with two layers you need to combine them - so you need to add a procedure pdb.gimp_image_merge_visible_layers

 # for G'MIC

pdb.plug_in_gmic_qt( image, layer,1,0,'samj_Angoisse 1,5,0,5,100,2,4,1,250')

You can combine these operations into one command (separating them with a semicolon).

Here is an example of creating fancy seamless patterns: 

pdb.plug_in_gmic_qt( image, layer,1,0,'deform 60.7');pdb.plug_in_gmic_qt( image, layer,1,0,'samj_Angoisse 1,5,0,5,100,2,4,1,250');pdb.gimp_image_scale(image, 250, 250);gegl_batch(image, layer,'tile-seamless')

Sample result:




How to use plugin (YouTube video) thanks 🙏 to Rich2005 - here.

  Ver.0.2 (23/09/2021)
 - bug fix for load bmp file,
 - add options: Change output extension.


  Ver.0.3 (02/10/2021)
Add options: Load all files Automatically Detected for Gimp without Raw files (it can be used as a converter of various types of files). 

Ver.0.4 (09/10/2021)
Add options: load Custom Code from file in the home directory: .../plug-ins/Actions-Presets/

How to create and use Actions-Presets see also here.
One of the ways to save the code:

No comments:

Post a Comment

Keep the tone of your comments civil and courteous. Keep in mind that there are no authors of plugins and scripts manning this site. Any comments posted for help or requests may go unanswered. Go to and do a search instead.