Contents:
Introduction: (top)
At times, in the GNU Image Manipulation Program (GIMP), I have many images open that I am editing at one time. Manually exporting/saving images using the menu or hotkeys can be a tedious task in a situation like this. So, I began looking for a solution that would save changes of all open images at once. The answer that I found was a GIMP Script, a.k.a. Script-Fu, file (.scm) floating around on the web. The original script appears to have been written in 2006. I have tested it with GIMP version 2.8.22 on MacOS 10.10.5.
The Script: (top)
Original: (top)
There are a few different versions of the script available. I believe the original, by Saul Goode, was posted here on this GIMP Nabble forum. However, I got the script from this answer on Stack Overflow. Content is the same, just some changes in the comment line breaks. This is the content of the script I have used:
; This program is free software ; you can redistribute it and/or modify ; it under the terms of the GNU General Public ; License as published by ; the Free Software Foundation ; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. (define (script-fu-save-all-images) (let* ((i (car (gimp-image-list))) (image)) (while (> i 0) (set! image (vector-ref (cadr (gimp-image-list)) (- i 1))) (gimp-file-save RUN-NONINTERACTIVE image (car (gimp-image-get-active-layer image)) (car (gimp-image-get-filename image)) (car (gimp-image-get-filename image))) (gimp-image-clean-all image) (set! i (- i 1))))) (script-fu-register "script-fu-save-all-images" "<Image>/File/Save ALL" "Save all opened images" "Saul Goode" "Saul Goode" "11/21/2006" "" )
Other Versions: (top)
(As of this writing, I have not tested these versions)
- A version, modified by Lauchlin Wilkinson, that prompts for base name, directory, etc. can be found here.
- It appears that a version was posted on gimpscripts.org in 2015, but the site is currently unreachable.
Installation: (top)
To install, save the script contents to a text file & give it the .scm filename extension. Mine is saved as saveall.scm. Place the file in GIMP’s scripts directory.
GIMP Scripts Directory Locations:
- Linux:
- ~/.gimp-<version>/scripts
- MacOS:
- ~/Library/Application Support/GIMP/<version>/scripts
- Windows (Vista & newer):
- GIMP 2.8 & older:
- C:\Users\<username>\.gimp-<version>\scripts
- GIMP 2.9:
- C:\Users\<username>\AppData\Roaming\GIMP\<version>\scripts
- GIMP 2.8 & older:
- Windows (XP):
- C:\Documents and Settings\<username>\.gimp-<version>\scripts
So, on my MacOS system, the file is located here:
- ~/Library/Application Support/GIMP/2.8/scripts/saveall.scm
Once installed, restart GIMP. If it loads correctly, the menu option File → Save ALL will be available: