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 405294 - PNG desktop image dimensions displayed divided by 10
PNG desktop image dimensions displayed divided by 10
Status: RESOLVED DUPLICATE of bug 356930
Product: gnome-control-center
Classification: Core
Component: Background
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: Rodney Dawes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-07 09:57 UTC by Sebastien Bacher
Modified: 2007-02-19 14:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Sebastien Bacher 2007-02-07 09:57:08 UTC
That bug has been described on https://launchpad.net/ubuntu/+source/control-center/+bug/83210

"Binary package hint: gnome-control-center

The list of wallpapers you get when changing your current wallpaper (with gnome-background-properties) doesn't correctly show .png wallpapers size.
For instance : 1280x800 will be shown as 128x80, 1600x600 as 160x60, ...

This problem doesn't affect .jpg files and not the other way to get .png size (for example file properties).

http://librarian.launchpad.net/6192680/Screenshot-Desktop%20Background%20Preferences.png
screenshot
..."
Comment 1 Rodney Dawes 2007-02-07 16:27:59 UTC
It's giving the sizes of the thumbnails, not size/10. All the 4:3 images in that screenshot are "128x96" which is what the thumbnail sizes would be. I don't see how this could possibly happen, unless something else is thumbnailing the images, and setting the metadata incorrectly in the thumbnails.

Does the problem continue to manifest if you rm -rf ~/.thumbnails and run gnome-background-properties without anything else generating the thumbnails first?
Comment 2 Sebastien Bacher 2007-02-09 09:50:44 UTC
It does the same after removing the thumbnails cache, downgrading GTK to 2.10.7 doesn't make a difference neither
Comment 3 Rodney Dawes 2007-02-09 14:43:39 UTC
I doubt GTK+ would make a difference. The thumbnailer code is in libgnomeui, not GTK+. The following bit of code looks suspect to me, in libgnomeui:

=================================================
  /* Fall back to gdk-pixbuf */
  if (pixbuf == NULL)
    {
#ifdef HAVE_LIBJPEG
      if (strcmp (mime_type, "image/jpeg") == 0)
	pixbuf = _gnome_thumbnail_load_scaled_jpeg (uri, size, size);
      else
#endif
	pixbuf = gnome_gdk_pixbuf_new_from_uri_at_scale (uri, size, size, TRUE);
    }
      
  if (pixbuf == NULL)
    return NULL;

  width = gdk_pixbuf_get_width (pixbuf);
  g_object_set_data_full (G_OBJECT (pixbuf), "gnome-thumbnail-width",
			  g_strdup_printf ("%d", width), g_free);
  height = gdk_pixbuf_get_height (pixbuf);
  g_object_set_data_full (G_OBJECT (pixbuf), "gnome-thumbnail-height",
			  g_strdup_printf ("%d", height), g_free);
=================================================

According to this, it is setting the thumbnail metadata to the size of the loaded pixbuf, which would be the size of the thumbnail (size is 128, or 256 for large thumbs). Perhaps this code needs to be fixed to get the info on the original uri, rather than the loaded image which is at a smaller size. I would expect to see this same issue in GNOME 2.16 though, as the log entry claims this code was committed in Jan 2006.
Comment 4 Jens Granseuer 2007-02-19 14:47:46 UTC
Turns out this is a known problem...

*** This bug has been marked as a duplicate of 356930 ***