GNOME Bugzilla – Bug 98490
File plug-ins should not use hardcoded default comment
Last modified: 2009-08-15 18:40:50 UTC
Several file plug-ins use a hardcoded string for the default comment if no comment is already attached to the image. This should be avoided because the user has no way to change that default value. Here are the offenders, as of 1.2.4-pre1: - csource.c:#define DEFAULT_COMMENT "Created with The GIMP" - jpeg.c:#define DEFAULT_COMMENT "Created with The GIMP" - tiff.c:#define DEFAULT_COMMENT "Created with The GIMP" - xbm.c: strncpy (xsvals.comment, _("Created with The GIMP"), MAX_COMMENT); The best long-term solution would be to copy the default comment from the preferences instead of taking the hardcoded value (see bug #98485), but for 1.2.4 the best option is to leave the comment empty instead of using the hardcoded strings. The current gif.c plug-in leaves it empty instead of using "Made with GIMP" as it did before. All plug-ins should do that.
What's the story on this one? Is there a quick fix in the pipeline? If not, I suggest bumping it. Dave.
It should be easy to fix these four plug-ins to not use any hard-coded comment.
For xbm, this is a non-issue. The writing of a comment is currently disabled in the gimp. See bug #82673. For the others, I've attached a patch (as it happens, this patch also also contains Maurits's 1.3 fix for bug #95737, which never got backported to the 1.2 branch (it's one of those bugs that will give translators headaches - in 1.3 it's a split string). Cheers, Dave.
Created attachment 16432 [details] [review] Patch file with proposed quick fix for bug #98490
Is empty string the right thing to do here? I don't think so. IMHO, no comment should be set instead of an empty one.
Created attachment 16434 [details] [review] New try - if no comment is set, do nothing.
In fact, the fixes work out equivalent, because the code afterwards tests if(comment && *comment) { attach parasite } Cheers, Dave.
Please commit to both branches.
Probably a silly question - will this also close bug #98485 ? I don't think so, but I'm not sure how best to address the problem in 98485, aside from what's already be done (the attachment of the default image everywhere the GIMP creates a new image). Cheers, Dave.
Fixed in 1.2: 2003-05-12 Dave Neary <bolsh@gimp.org> * plug-ins/common/csource.c * plug-ins/common/jpeg.c * plug-ins/common/tiff.c: If no comment is set on a GimpImage when it arrives to be saved, don't attach one. Fixes bug #98490 and bug #98485 * plug-ins/common/tiff.c: Alert user to loss of precision when opening a 16 bit tiff. Backport of Maurits Rijk's fix for bug #95737
Bolsh, can you please make sure this change goes into HEAD as well? Actually changes are supposed to happen in 1.3 first, then being backported to the stable branch.
I will do, this evening. I was rushing to get this done this morning; Dave.
Fixed in HEAD: 2003-05-12 Dave Neary <bolsh@gimp.org> * plug-ins/common/csource.c * plug-ins/common/jpeg.c * plug-ins/common/tiff.c: If no comment is set on a GimpImage when it arrives to be saved, don't attach one. Fixes bug #98490 - and removes code which does what is suggested in bug #98485 as correct behaviour.
The fix is part of the stable release 1.2.4. Closing this bug.