Re: [Gimp-developer] handling of image comments (was 1.2 Bug Hunting)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 20 Jun 2001, Sven Neumann wrote:
[about http://bugzilla.gnome.org/show_bug.cgi?id=51164 ]
> Yes, it's exactly the problem described in the bug-report. Gimp does
> only attach a gimp-comment parasite to an image if it is created using
> File->New. Other ways to create an image (Paste as New, Screenshot,
> Clipboard) do not attach the default comment. If you save an image that
> has no comment parasite attached, the save plug-ins use their hardcoded
> value.

The real problem is that the plug-ins use their hardcoded value.  If
they would use the value specified by the user (saved in gimprc), then
there would be no surprises for the user.

> If we'd fix this by making gimp_image_new() attach a default comment
> parasite (just like it sets the default resolution), all images touched
> by The GIMP would get the default comment unless they already have a
> comment and the respective load plug-in takes care of setting it as a
> parasite.

IMHO this is a bad idea.  It would hide the problem from a developer's
point of view, but I am not sure that it would be really helpful for
the average user.

Currently, the only places where the users see the image comments are
the preferences dialog and the "save" plug-ins (the parasite editor is
for experts only).  Therefore, most users (that I have observed) think
that the comment is set when the image is saved, not when it is
created.  This is a problem in the following scenario:
- user creates several images or modifies existing images
- user goes to the preferences dialog and changes the default comment
- user saves all images, expecting them to get the default comment
  because no comment was set previously for these images

Another problem is when an image without comment is loaded and then
saved in another format.  It is probably not appropriate to add a new
image comment saying "Created with the Gimp" if this image was simply
converted.  On the other hand, if the user has replaced the default
comment with a copyright message, she probably wants this to be
attached to all images by default.  The best way to solve this would
be the following:
- the image comment is never set when creating or loading an image,
  except if one was already present in the file
- in all save plug-ins, add an option "replace current comment with
  default comment" (this assumes that the plug-ins get it from gimprc).
This would be more convenient for the user, who could then choose if
a comment should be added or not, and would also have the opportunity
to replace an old comment with the current default value.  This is
useful for those who change their copyright message and want to update
this comment in several files (currently, it is necessary to delete
the old comment and re-type or copy the new one in all files).

It would also be nice to add the following multiple choice in the
preferences dialog, on the same page as the one in which you set the
default comment:
  [ ] do not modify or add image comments
  [x] add the default comment to the images that have no comment yet
  [ ] always replace the existing comment with the default one

> Another way to fix this is to change places like Paste as New,
> Screenshot, Clipboard etc. where images are created and let them take
> care of attaching the default comment.

Same problems as above.  I think that it would be better to leave the
comment undefined, until the file is saved.

> I don't consider this problem serious enough to insist on having it
> fixed in 1.2. If it turns out that there is no simple solution, we'll
> tackle this problem in the 1.3 tree.

Agreed.  In general, the handling of image comments and other
parasites should be discussed a bit more on this list (so this will
probably not be fixed in 1.2).  For example, some file formats support
comments in 7-bits ASCII only while others support ISO-8859-1, UNICODE
or other charsets.  Some of them allow only a single line, some of
them are much more flexible.  There is currently no good conversion
between these formats.  If you have ever tried to preserve a
multi-line comment containing accented characters accross several
load/save operations using different image formats, you will know what
I mean.

There are other parasites that should also be converted (and made more
visible to the user than through the "parasite editor").  See for
example the bug report that I entered this morning about the TIFF/EP
and EXIF data that is saved by most digital cameras but ignored by the
Gimp:  http://bugzilla.gnome.org/show_bug.cgi?id=56443

-Raphael



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux