Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have many pictures and want to do the same effect or the same change to all these pictures by GIMP,Is there is easier method to do this instead of applying the effect to the pictures picture by picture?

share|improve this question
up vote 4 down vote accepted

Script Fu

Script Fu is a script/macro language that can be used by GIMP users in order to apply any kind of effects/changes to images. More information about what is Script Fu can be found here:

The good thing about these scripts is that they can be shared and used everywhere! If you've made your own script or you have found a ready script online that does the job for you, then you can make GIMP aware of it quite easily: Simply move it to one of your script-folders. These folders can be found and modified by going to Edit->Preferences->Folders(usually last item)->Scripts and they usually by default are ~/.gimp-v/scripts and /usr/share/gimp/v/scripts:enter image description here

Once you have placed your script there, you will need to refresh the list with your scripts. This can be done using the menu: Filters->Script-Fu->Refresh Scripts. Any new script that you have placed inside the Script-Fu folder(s) can now be used. The script will now be available in one of your menus, provided that the script doesn't contain any syntax errors.

Now, you will be able to use your scripts directly on your images. But, gimp can be called through the command line with an argument a script-fu. This is very important for your occasion, as you don't want to repeat your actions.

After you follow the excellent (official) tutorial I linked to and you create the appropriate script-fu for your occasion, you then should call gimp with this script fu as an argument and apply it to all of your images. This will alter all of your images massively!

An example script is the following:

gimp -i -b '(batch-unsharp-mask "*.png" 5.0 0.5 0)' -b '(gimp-quit 0)'

It will run the batch-unsharp-mask filter to *.png (all the .png files in the current directory) with the arguments 5.0, 0.5 and 0. Then it will simply quit with exit code 0 (gimp-quit 0).

share|improve this answer
My general idea about scripts is that it used if the desired change in the pictures has complicated or many steps so I save it in one script that I can apply every time I want to apply the same change,but this means that if I want to apply one change to 40 picture I will apply the script 40 times each time to one picture only,but I want something makes me apply the change to the 40 picture in one time at the same time,something like(apply the change to all image in this directory).Can scripts do that? – Mamdouh Nov 1 '12 at 20:26
yes of course it can do it :) – hakermania Nov 1 '12 at 20:32

If you are primarily batch processing images and the changes you want to apply to them aren't overly complicated, you might want to look into phatch. It's pretty easy to configure, much easier than Script Fu.

Installation under 12.04/12.10

sudo apt-get install phatch
share|improve this answer

You can install the gimp-plugin-registry Install gimp-plugin-registry from the repositories and then use David's batch processor to do the most common processing of images.

share|improve this answer

In response to the software-recommendation tag:

I personally prefer ImageMagick for these types of situations. It accepts edits as command line parameters, and can operate on a whole directory of files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.