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 472975 - EOG should intelligently guess whether to use PNG or JPG when the user doesn't specify an extension/file format.
EOG should intelligently guess whether to use PNG or JPG when the user doesn'...
Status: RESOLVED OBSOLETE
Product: eog
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: EOG Maintainers
EOG Maintainers
: 538141 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-09-02 22:36 UTC by Reinout van Schouwen
Modified: 2021-06-19 08:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Reinout van Schouwen 2007-09-02 22:36:06 UTC
+++ This bug was initially created as a clone of Bug #427806 +++

from comment 15:

One could argue that the user should be pointed to the file format filter
dropdown box in the filechooser, but this box is visible only when the user has
expanded it, and then still it's unobvious.

Instead I propose to "do the right thing" and select a proper extension when
the user didn't specify it. Is it possible to detect whether an image is likely
a photograph or line art? Perhaps GIMP or Inkscape already contain such an
algorithm and it could be used to choose either PNG or JPG. If it's too
difficult then we should go for the lossless option, namely PNG.
Comment 1 Claudio Saavedra 2008-06-13 12:48:57 UTC
*** Bug 538141 has been marked as a duplicate of this bug. ***
Comment 2 Francis Markham 2008-06-13 12:56:58 UTC
Is it too much of an ugly hack to extract the file extension from the original file name and use that?
Comment 3 Claudio Saavedra 2008-06-13 13:03:05 UTC
More than an ugly hack, the problem is that eog is able to open more file formats than what it can save. The alternative that some people propose is to choose between a standard lossless format (PNG) when the original image is in a lossless format or JPEG otherwise.
Comment 4 Francis Markham 2008-06-13 13:10:05 UTC
Would it still be an ugly hack to detect the file type based on the file extension of the original?  Also, I'm pretty new to open source/gnome/bugzilla, is this bug tracker the right place to ask questions like this?
Comment 5 Claudio Saavedra 2008-06-13 13:22:21 UTC
(In reply to comment #4)
> Would it still be an ugly hack to detect the file type based on the file
> extension of the original?  

It's better to do it using the mimetype detection. Some files may have a .bmp extension but actually be a JPEG file.

> Also, I'm pretty new to open source/gnome/bugzilla,
> is this bug tracker the right place to ask questions like this?

If it's about approachs to solve issues in EOG or to comment on implementation proposals, yes, it's fine.

If you have more general questions (programming, gtk+, fetching code from SVN, etc.) I recommend you to use the gnome-love@gnome.org mailing list.

Comment 6 Francis Markham 2008-06-13 16:30:49 UTC
Is the full list of file types we can write to the list presented in the Save As dialog, i.e. tif, png, jpg, ico, bmp?  I assume we should respect that setting if the user has chosen one from the list but not added the file extension?
Comment 7 Francis Markham 2008-06-22 11:09:00 UTC
Currently, the image format detection implemented to fix bug 427806 occurs in the save_response_cb(...) function in eog-file-chooser.c.  In order to automatically insert a new, suitable file extension in this function or before it is called the image file GFile pointer must be passed to this function somehow.  What is the best way to do this?
Comment 8 André Klapper 2021-06-19 08:47:15 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/eog/-/issues/

Thank you for your understanding and your help.