After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 51164 - Default image comment not set correctly
Default image comment not set correctly
Status: VERIFIED FIXED
Product: GIMP
Classification: Other
Component: General
1.x
Other All
: Normal minor
: 1.2
Assigned To: GIMP Bugs
GIMP Bugs
: 54209 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-02-20 12:39 UTC by marco
Modified: 2016-07-18 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for screenshot.c to add the default comment to the image when creating it. (1.09 KB, patch)
2003-05-13 21:27 UTC, Dave Neary
none Details | Review

Description marco 2001-02-20 12:39:32 UTC
creating a new file from a screenshot (File -> acquire -> screenshot) and
saving it as jpg does not insert the default comment to it.
Comment 1 Raphaël Quinet 2001-02-23 08:04:25 UTC
Indeed, when I capture a screenshot and save it as JPEG, TIFF, XBM
or C-Source, the comment is set to "Created with The GIMP" instead
of using my default comment.  If I save the image as GIF, then the
comment is empty (unless I previously tried to save in one of the
formats mentioned above, in which case the comment is also set to
"Created with The GIMP").

In all these cases, my default comment should have been used instead.

This also happens with other functions, not only with the screenshot
plug-in.  For example, if you cut a part of an image and then use
"Paste as New", the new image will behave in the same way as those
generated by the screenshot plug-in: the default comment is not set,
and the various file plug-ins add their own comment instead of using
the one defined in my gimprc.
Comment 2 Raphaël Quinet 2001-04-26 18:12:22 UTC
Re-assigning all Gimp bugs to default component owner (Gimp bugs list)
Comment 3 Raphaël Quinet 2001-05-06 08:11:00 UTC
*** Bug 54209 has been marked as a duplicate of this bug. ***
Comment 4 Sven Neumann 2001-06-18 23:47:29 UTC
There are several possible ways to fix this...

A simple solution would be to attach the default comment to all images
that are created using gimp_image_new() which simply means all images.
This includes images created by load plug-ins. It's the load plug-ins
responsibility then to change the comment. This is no problem at all
if the loaded image has a comment and the load plug-in reads and uses
it correctly. If this is not the case, the image will get the default
comment, usually "Created With The GIMP" (or whatever the user choose)
even if the image was originally created by another app.

Another possible fix would be to add the addition of the default
comment to some places where it was simply forgotten: paste_as_new, 
screenshot plug-in and probably more...

I'm undecided....
Comment 5 Raphaël Quinet 2001-06-20 07:11:49 UTC
Here are two other ways to solve this problem:
- In all save plug-ins (for the file formats that support comments),
  add an option "use default comment".  This button or checkbox would
  replace the current image comment with the default one, as defined
  by the user.
- Provide a simple comment editor (probably a plug-in) that registers
  itself in the File menu (File->Properties or File->Image comments)
  and allows the use to edit the current image comment easily.  One
  of the options would be to replace the current comment with the
  default one.  Other options and information could also be available
  in the File->Properties options, such as the gamma curves, color
  profiles, EXIF information for files saved from digital cameras
  (containing things such as date and time, description, camera model,
  software version, copyright, aperture, shutter speed, flash, ...)
  and various other things.
Comment 6 Sven Neumann 2001-06-30 18:05:16 UTC
"Paste As New" does now attach the default comment:

2001-06-30  Sven Neumann  <sven@gimp.org>
  * app/global_edit.c: attach default comment to image created by 
    "Paste As New" (addresses bug #51164).


Comment 7 Raphaël Quinet 2001-10-01 18:07:47 UTC
Let's keep the focus of this bug on "making sure that a comment is
(almost) always set".  The other part of the problem (how to allow
the user to change what has been set) is now in a separate report:
see bug #61499.
Comment 8 absinthe 2002-11-14 08:53:34 UTC
Seeing as how this bug is a year old and I'm still seeing it in my 
build of gimp 1.2.3 -- any hope of this one ever being fixed?  
Comment 9 Raphaël Quinet 2002-11-14 14:59:57 UTC
This bug is still present in 1.2.4-pre1 and in CVS.

The correct way to fix this problem would require some changes in all
plug-ins.  Contrary to what Sven and I thought earlier, now I think
that it would be better to leave the comment unset when creating a new
image.  I have just submitted that as a new bug report (bug #98485).
But even though I would like this to be fixed in the 1.2.x branch, I
think that it is more realistic to expect this to be done in the
development branch.

For 1.2.4, the easiest solution is probably to fix the bug as
suggested above (even if this is not the correct fix from my point of
view) and make sure that the screenshot plug-in gets the default
comment from the preferences and attaches it to the image that it
creates, after calling "file-xwd-load".
Comment 10 Dave Neary 2003-05-10 18:11:19 UTC
Linked directly to bug #98485 - can we fix both for 1.2.4 fairly
quickly, or consider bumping them to 1.2.5?

Dave.
Comment 11 Sven Neumann 2003-05-11 00:10:42 UTC
IMO this could be fixed fairly quickly.
Comment 12 Dave Neary 2003-05-13 07:06:37 UTC
Is this not finished with the "paste as new" patch above? What's left
to be done on this bug?

Dave
Comment 13 Dave Neary 2003-05-13 09:00:25 UTC
OK - what places in the gimp create new images? I think the second of
Sven's original proposals is the correct solution. It's a pity that
there's no central place where all GIMP created new images pass
through (as opposed to plug-in loaded images) - if there were, we
could just add the default comment in that one place.

In other words, to what existing places do we need to add the default
gimp comment?

In a related question, how can a plug-in get at the GimpRc structure? 

Dave.
Comment 14 Sven Neumann 2003-05-13 11:02:13 UTC
See http://developer.gimp.org/api/1.3/libgimp/libgimp-gimpgimprc.html.
IIRC the 1.2 API is identical.
Comment 15 Dave Neary 2003-05-13 21:27:50 UTC
Created attachment 16504 [details] [review]
Patch for screenshot.c to add the default comment to the image when creating it.
Comment 16 Dave Neary 2003-05-13 21:29:36 UTC
There may be things about this patch people don't like, and it'll be
slightly different for 1.2. That's because gimp_image_default_comment
isn't in the 1.2 API. But if this is OK to commit to both branches,
it'll close this bug I think.

Dave.
Comment 17 Sven Neumann 2003-05-14 09:40:33 UTC
Please check if gimp_image_get_default_comment() returned non-NULL
before setting the comment. Apart from that, please commit and close
this report.
Comment 18 Dave Neary 2003-05-14 18:58:48 UTC
Fixed in HEAD and 1.2:

2003-05-14  Dave Neary  <bolsh@gimp.org>

        * plug-ins/common/screenshot.c: Attach default comment to
        image made by screenshot. Fixes bug #51164

Comment 19 Raphaël Quinet 2003-06-20 17:17:31 UTC
The fix is part of the stable release 1.2.4.  Closing this bug.