Dealing With Gimp 2.8's New Save Feature


by Paul Arnote (parnote)

Finally, the much anticipated Gimp 2.8 has arrived. Along with it, comes one change that users have wanted for years: a single window Gimp environment. While the default configuration for Gimp is the same as it has been since time immemorial (the multi-window layout), it only takes two single mouse clicks to obtain the single window configuration.

To use Gimp 2.8 in the single-window configuration, click on the “Windows” menu, followed by the “Single Window Mode” menu entry. You will get a Gimp window similar to the one shown above.

Unfortunately, there’s a tradeoff for the new single window configuration. Up until Gimp 2.8, you could open an image for editing, and when you go to save your edits, you could select “Save” or “Save As...” to save the image in the same format as the original image. But now, under Gimp 2.8, the “Save” and “Save As...” features only save your images in Gimp’s own default *.xcf format. Now, with Gimp 2.8, you have to use the “Export” menu option to save your image in any other graphic format.

While inconvenient, the new saving method of Gimp does have its merits. Gimp’s XCF format is a lossless format that also preserves the information for all of the layers in your image. This means that when you open it up again, you are right back to where you left off, without any loss of image quality. The downsides of the XCF format is that a) it isn’t as “usable” as JPG or PNG formats, and b) it is a bit of a bloated format, in regards to file size.

My original intent in writing this article was to sing the praises of a Gimp script that I stumbled across that supposedly dealt with the new behavior of Gimp’s save function. But upon giving it a try, I discovered that it doesn’t seem to do anything more than the “Overwrite” function (File > Overwrite) that’s already present in Gimp 2.8 (as shown in the graphic above). It actually might be useful if it at least brought up a “Save” dialog box to allow you to give it another name, so that you don’t overwrite your original file. Unfortunately, I don’t know enough about Python scripting to be able to rewrite the script to provide the Save dialog box whenever it is called.

If you want to explore the script, called “Save/Export Clean,” you can check it out here. You can get the Python code here. Just copy the code into a text editor, and save it as save-export-clean.py in your ~/.gimp-2.8/plug-ins directory (create the directory if it doesn’t already exist). Be sure to mark the file as an executable, either in the “Properties” dialog box for the file, or by issuing the following command in a terminal:

chmod 755 ~/gimp-2.8/plug-ins/save-export-clean.py

One of the advantages touted about using this script is that you can remap Gimp’s keyboard shortcuts to have the script called when you press “Ctrl + S” to save a file. But you don’t need a script to do that. Gimp gives you the ability to remap any menu command to any keyboard shortcut you like.

So, with that in mind, we can remap the existing “Overwrite” command to the “Ctrl + S” keyboard shortcut. Or even better yet, we can reverse the keyboard shortcuts for “Save” and “Save As...” with those for “Export To” and “Export...” While it won’t change the functioning of the menu items, it will at least bring up the more appropriate command when you use the keyboard shortcuts to save or export your images. Select “Edit > Keyboard Shortcuts” to bring up the dialog box pictured below.

Simply highlight the menu item whose keyboard shortcut you want to change and press the keyboard combination for the new keyboard shortcut. If you enter a keyboard shortcut that is already in use, Gimp will ask for confirmation to reassign the keyboard shortcut and, if accepted, will disable the keyboard shortcut’s previous assignment.

With this in mind, I changed “Export to” to use the keyboard shortcut of “Ctrl + S,” which was previously assigned to the “Save” function. This brings up the usual “Save” dialog box, giving me an opportunity to not only save the current image in the same graphic format, but to also give it a new name. This helps me to avoid overwriting my original file (which I can do, if I want to) so that it remains intact and unaltered. Similarly, I remapped the “Export...” function to use “Ctrl + Shift + S,” which was previously mapped to the “Save As...” function.

While I was busy remapping the keyboard shortcuts, I also remapped “Save” to use the “Ctrl + E” keyboard shortcut that was previously used by the “Export...” function. I also remapped “Save As...” to use the “Ctrl + Shift + E” keyboard shortcut that was previously used by the “Export to” function.

Summary

Having done that, at least my keyboard shortcuts now mimic the behavior of previous versions of Gimp, allowing me to save the edits to my images in the same format that the original image is saved in. When using the menus visually, via mouse clicks, I will still have to be aware of the difference in the behavior of the current Gimp’s save feature, versus the export feature, and pick the right function for what I’m wanting to do.

The new Gimp is better than ever. As with the continual evolution of anything, things change. We will just have to adapt to the new “Save” vs “Export” distinction in Gimp. I suspect that, in time, we will and in hindsight may wonder what all the fuss was about.