index.md 4.39 KB
Newer Older
1
Title: Making settings persistent in GIMP
2 3 4
Date: 2016-10-06
Category: News
Authors: Alexandre Prokoudine
5 6
Slug: making-settings-persistent
Summary: Until fairly recently GIMP didn't do a very good job of remembering all the types of possible customizations. Upcoming v2.10 has some major improvements in that department.
7

8
Until fairly recently GIMP didn't do a very good job of remembering all the types of customizations. If you applied a filter to an image and liked the combination of options that you used, there was no way you could save that combination for a later use. If you carefully chose selection stroking options, the next time you had to stroke a selection, you had to define settings all over again.
9 10 11

Upcoming v2.10 has some major improvements in that department.

12 13 14
<figure>
    <img src="{filename}gimp-2-9-5-filter-named-presets.jpg" alt="Adding a named preset for the Unsharp Mask filter in GIMP" width='975' height='442' />
</figure>
15

16
Early in the current development cycle we started porting existing GIMP filters to GEGL operations and using the GEGL tool skeleton to wrap their GUIs into. This made it possible to automatically save each used combination as preset with a timestamp for a name, or manually&mdash;as a named preset. If you've been using v2.9.2 or v2.9.4, you most likely benefit from that already.
17

18 19 20
<figure>
    <img src="{filename}gimp-2-9-5-masks-in-xcf.jpg" alt="Using masks for digital photrography in GIMP" width='975' height='596' />
</figure>
21

Alexandre Prokoudine's avatar
Alexandre Prokoudine committed
22
The second part of improvements started with reviewing a [patch](https://bugzilla.gnome.org/show_bug.cgi?id=759601) submitted by Benoit Touchette. As a professional photographer, he regularly works on hundreds of photos daily and has an extensive use of masks, so he needs to get from A to B extremely fast. Benoit came up with a clever idea to simplify adding new masks: clicking on layers' previews. Various modifier keys would additionally define whether you apply and remove the mask or just drop the mask entirely.
23

24 25 26
<figure>
    <img src="{filename}gimp-2-9-5-easy-mask-create-tooltip.jpg" alt="Tooltips for handling masks quickly in GIMP" width='975' height='536' />
</figure>
27

Alexandre Prokoudine's avatar
Alexandre Prokoudine committed
28
The difficult part was to come up with a way to remember the last used mask initiation setting not just within one session, but across sessions. So instead of creating a special case for just the _Add Layer Mask_ dialog, Michael Natterer added a whole new infrastructure to automatically save and load the settings of dialogs.
29

30
All the dialog defaults are stored in the _gimprc_ configuration file. To give you an idea, this is how stroking options are saved in _gimprc_:
31

32 33 34 35 36 37 38 39 40 41 42 43 44
	(stroke-options
    	(style solid)
	    (antialias yes)
	    (method line)
	    (width 6.000000)
	    (unit pixels)
	    (cap-style butt)
	    (join-style miter)
	    (miter-limit 10.000000)
	    (dash-offset 0.000000)
	    (dash-info 0)
	    (emulate-brush-dynamics no))

45
The options are preserved for dialogs like _New Channel_, _Feather Selection_, _Stroke Path_ and others. To give you visual control over the settings, Michael created a new page in the _Preferences_ dialog called _Dialog Defaults_.
46 47 48 49 50

<figure>
    <img src="{filename}gimp-2-9-5-prefs-dialog-defaults.png" alt="Dialog Defaults preferences page in GIMP 2.9.5" width='805' height='638' />
</figure>

Alexandre Prokoudine's avatar
Alexandre Prokoudine committed
51
You may have noticed a few more new things about the _Preferences_ dialog. There is now a scrollbar on large pages to make the dialog fit small screens like the still popular 1366x768 on lower-end laptops (quite a few GIMP users reported that _Preferences_ was getting too big). Additionally, some pages now feature a reset button that restores default settings.
52 53 54

The dialog defaults feature will be available in GIMP 2.9.6 and, eventually, in GIMP 2.10.

55
The introduction of filter presets and dialog defaults gets us closer to resolving [#63610](https://bugzilla.gnome.org/show_bug.cgi?id=63610), [#120829](https://bugzilla.gnome.org/show_bug.cgi?id=120829), and [#599573](https://bugzilla.gnome.org/show_bug.cgi?id=599573), filed in 2001, 2003, and 2009 respectively. If you think that more dialogs could benefit from either saving their settings as defaults or getting named presets, please drop by on [IRC](https://www.gimp.org/irc.html) or the [mailing list](https://www.gimp.org/mail_lists.html) for developers and tell us.
56

57
If you are interested in helping out with getting GIMP 2.10 released, please check out the [TODO](http://wiki.gimp.org/wiki/Hacking:TODO#2.10) page.