GNOME Bugzilla – Bug 63610
Some plug-in settings should be persistent accross sessions
Last modified: 2018-05-24 10:35:52 UTC
It would be nice if there was a way to save some settings for the plug-ins (especially the file_save plug-ins) so that they become the new defaults for the next invocation of the plug-in. Currently, these settings are preserved during the current session, but they are lost when you exit and restart the Gimp. This should be optional because in most cases it is better to go back to the hardcoded defaults whenever the Gimp starts. But sometimes these defaults are not optimal and it would be nice to have a way to change them. For example, there could be a "Save Default Options" button in all plug-ins that can be called interactively.
*** Bug 58869 has been marked as a duplicate of this bug. ***
*** Bug 61088 has been marked as a duplicate of this bug. ***
Summary of the duplicates: - bug #58869 (reported by Marcin Orlowski) Save the state of the "interlace" checkmark in the GIF save plug-in - bug #61088 (reported by Jamie Zawinski) Save the default quality setting in the JPEG save plug-in (e.g, 85%)
*** Bug 75398 has been marked as a duplicate of this bug. ***
As described in bug #75398, the lack of global defaults for the file_save plug-ins (except for the hardcoded ones that cannot be modified by the user) can lead to some confusing situations in which the user thinks that a file will be saved with the correct settings but is instead saved with the (incorrect) default values. Adding a way to set some new global defaults would solve that problem. A different issue related to the usability has been reported by Ed Halley in bug #75328: allowing the user to set correct defaults would make it easier to save a large number of files without having to check all options in the dialogs for every file.
This bug's almost two years old now -- any chance of ever being able to set the default JPEG quality setting to something else? Please? Or, if that's too hard, how about just changing the default from 75% to something that looks less crappy, like 85% or 88%?
This would definitely not be changed in 1.2 but if you want that feature for 1.4, you should try to come up with a patch. Otherwise, most likely, nothing will change.
Changes at the request of Dave Neary on the developer mailing list. I am changing many of the bugzilla reports that have not specified a target milestone to Future milestone. Hope that is acceptable.
Bumping a bunch of enhancement requests which will not be done by the feature freeze to Future. Dave.
*** Bug 119032 has been marked as a duplicate of this bug. ***
*** Bug 119626 has been marked as a duplicate of this bug. ***
*** Bug 128084 has been marked as a duplicate of this bug. ***
Here are some additional comments about the confusing notions of "defaults" and "current settings" for the File->Save plug-ins. What happens when a new image is created or loaded from disk has been the subject of several controversial discussions, such as in bug #75398 and bug #119032. I think that having a way to set the new defaults explicitely as suggested here will make it clear that these user-configurable defaults will be used for any new image, regardless of what is done for other images in the current session. The current model inherited from the early GIMP versions is hard to understand for some users: there are several sets of parameters that influence the way the images are saved: - the hardcoded defaults (no way to configure them) - the "current settings" for this session (based on the last save) - the image-specific settings The hardcoded defaults are used for any new images until you save the first one. Once you have saved at least one image, you have created a set of "current settings" for this session and they will be used as the new default values for new images, but not for the images that have already been saved at least once. Once an image has been saved, it keeps its own values. The new concept would be easier to understand because there would be only two sets of parameters: - the configurable defaults for new images - the image-specific settings The governing principle is that each image is independent of the others: it starts with the default settings when it is created, and these become the image-specific settings from then on. What happens to the other images is irrelevant (for new or existing images). The user can configure the default settings at any time, and they will be used for all new images from then on. So the new model would replace the hardcoded defaults (persistent but not configurable) and the current settings (not persistent accross sessions) by a set of default settings that are both persistent and configurable. Also, the configuration would be explicit instead of changing every time depending on what image was saved last.
I knew there was a bug on this.. bugzilla has the most useless search feature ever. 2004-01-06 Manish Singh <yosh@gimp.org> * plug-ins/common/png.c: Implemented default settings, for both the UI and the PDB. Settings are stored in gimprc, but right now saving is broken since gimp_gimprc_set is broken right now. There are 3 new PDB entry points: file_png_save_defaults, which is a save function that only takes drawable and filename info, and uses the stored gimprc settings for the rest of the parameters. This is hooked up to the save magic, so using gimp_file_save to save as png now won't make big files anymore. The other two are file_png_get_defaults and file_png_set_defaults, which query and set the gimprc setting respectively. I also did some cleanup, and added a comment boolean to the file_png_save2 interface. The string serialization to the gimprc is sort of dumb, but it works. Next step is to do similar for jpeg and gif.
Also, Sven changed it to store as an app parasite, instead of the gimprc. So currently, if there are session defaults, they are loaded in preference to the persistant default. What do people think, is that behavior right? Should parasite defaults be given a preference instead?
Also, thoughts on the UI? It looks a little cluttered, and there isn't a GUI way to clear the defaults to hardcoded ones (dunno how useful that is).
Since you asked for opinions... I like a part of these changes, but not the session settings. I think that having any session-specific settings is wrong and confusing for the user. You can re-read my last comment (2003-11-28) and especially the last part of it for details, but basically I think that session settings may lead to unwanted results if what you do to one image influences the other images, sometimes without your knowledge (i.e., you create an image, save it and expect your usual defaults to be applied, but instead the image is saved with some values depending on what was done in another image of the same file format). To avoid that, there should be only two kinds of settings: the defaults, requiring _explicit_ configuration, and the current settings for each image (without cross-image pollution).
*** Bug 160565 has been marked as a duplicate of this bug. ***
*** Bug 134990 has been marked as a duplicate of this bug. ***
We've added a lot of the framework that is needed to make this happen. Sadly though, noone seems to be willing to implement the missing parts...
Re comment #21, my recollection is that the next step requires making some changes in the pdb, but I was never able to get a clear understanding of what you and mitch had in mind.
Of course named parameters in the PDB would make this task a lot easier but I don't think that any PDB changes are absolutely needed at this point.
What is the next missing part that is absolutely needed, then?
There is none. Someone just needs to propose a reasonable solution and implement it.
I just want to comment, that I'd also appreciate if this bug would finally be fixed. It was filed in 2001! So what is keeping gimp from saving my preference: I want all TIFF files to be saved using LWZ and not JPEG?
This is the wrong attitude - some would even say it is rude behaviour. If you want it faster, consider contributing.
*** Bug 324545 has been marked as a duplicate of this bug. ***
Created attachment 90937 [details] [review] JPEG plug in new source code (proposal) : settings record
Ok, I added two buttons to the JPEG plug in as in the PNG plug in. It is now possible to record everything (from quality to text comment). It is possible that the EXIF is bugged, but I am not sure. This patch has to be tested a little bit more. I also detected a bug in the previous version, that crashes the plug in (check "use restart markers" and then check "preview"->crash I resolved this problem. See attached code for the new JPEG plug in code.
(In reply to comment #30) > Ok, I added two buttons to the JPEG plug in as in the PNG plug in. It is now > possible to record everything (from quality to text comment). > It is possible that the EXIF is bugged, but I am not sure. This patch has to be > tested a little bit more. > > I also detected a bug in the previous version, that crashes the plug in (check > "use restart markers" and then check "preview"->crash > I resolved this problem. > > See attached code for the new JPEG plug in code. > Please forgive me... this is the first time I am participating as dev' to an open source project... The attached file is not a patch, it is my code, from an old jpeg plugin version. I will do a *real* patch in a day or two with the latest source code of jpeg plugin Thks !!
Ok, I finally reimport all my stuff and adapt my elder code to the new one downloaded from SVN server. It works, I just don't save comment to the picture because I don't think this is a great behaviour, but I can add it if it seems right. I propose my three patches, three files I modified. Try it and give me feedback.
Created attachment 90997 [details] [review] jpeg.c patch for record parameters
Created attachment 90998 [details] [review] jpeg-save.c patch for record parameters
Created attachment 90999 [details] [review] jpeg.h patch for record parameters
thanks , I'll try to test this later but I'm a bit busy. Do you realise that you can create a single patch that covers all differences ? You don't need to do post 3 patches. Just run diff on the whole tree not each file. This makes it a lot easier for others to use and means the change is self contained. Probably best if you submit a unified patch that does all three. HTH
Created attachment 91028 [details] [review] Patch for jpeg tree, enabling record settings from session to session
Ok, I uploaded a patch for the whole jpeg plugin tree... I'm sorry, I did not know this was possible, this is not described in the page http://developer.gnome.org/tools/svn.html Thanks !
You must not use C++ style comments in GIMP code. Your patch also looks like you used Tabs where you should have used spaces. Could you correct these issues?
And please move the JpegSaveGui struct as well as the RESPONSE defines to jpeg-save.c.
Actually, the buttons should not be in the action area at all and need no response ID. Please look at the PNG save dialog in recent 2.3 versions, the buttons in the JPEG save dialog should look exactly the same.
I will change my code to reflect your comments this week end, I hope it will fit your specifications.
Created attachment 91365 [details] [review] Patch to record settings of jpeg plugin from session to session
Created attachment 91366 [details] [review] Patch to record settings of jpeg plugin from session to session
I finally managed to recode some stuff : - change the look of buttons to map the png plugin style - removed all tabs changed to space - replaced c++ comment to c style I did not move the JpegSaveGui struct to jpeg-save.c because this struct is needed to define the function load_gui_defaults Hope it will fit your recommendations.
The function prototypes also belong into jpeg-save.c. Please move the struct definition and the prototypes for static functions to the C file.
Created attachment 91429 [details] [review] Record session to session jpeg settings Ok, I changed the function definitions to the .c
Thanks for your contribution. I have applied the patch with some minor coding style modifications. 2007-07-08 Sven Neumann <sven@gimp.org> * plug-ins/jpeg/jpeg.c * plug-ins/jpeg/jpeg-save.[ch]: applied patch from Etienne which adds configurable default parameters similar to the PNG save plug-in. Addresses bug #63610.
What is missing to close this Bugreport? As far as I can see these two points are mention in the comments: - Save the settings in the TIFF save plug-in - Save the settings in the GIF save plug-in What other plug-ins are important?
The approach taken for the PNG and JPEG plug-ins is wrong and we should not take it any further. It's only a temporary solution until plug-in settings are implemented in a generic way so that they can be used in all plug-ins. That's what this bug report is about. The JPEG patches shouldn't have been attached here. But since they were, we handled them here.
(In reply to comment #50) > The approach taken for the PNG and JPEG plug-ins is wrong and we should not > take it any further. It's only a temporary solution until plug-in settings are > implemented in a generic way so that they can be used in all plug-ins. That's > what this bug report is about. The JPEG patches shouldn't have been attached > here. But since they were, we handled them here. > What kind of solution do you expect ? I don't really know how all The Gimp is working, do you have some ideas of a generic implementation for settings being saved from session to session ?
After the 2.4 release I will probably find some time to open a new bug report with more details. That bug report can then replace this one.
*** Bug 741476 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/11.