image: support scale factor when loading from GResource and file

Desktop / GNOME / GTK - Cosimo Cecchi [gnome.org] - 29 July 2014 03:13 UTC

Currently, when loading an image from a GResource or file we don't take the scale factor of the display into consideration, and let GtkIconHelper scale it accordingly. While this in general works for non-scalable images, we can take advantage of the native loader's scaling for e.g. SVG images, and load them at the right scale factor automatically. This is achieved by switching to a pixbuf loader instead of using the native function.

https://bugzilla.gnome.org/show_bug.cgi?id=733416

7e425f3 image: support scale factor when loading from GResource and file
gtk/gtkimage.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 97 insertions(+), 2 deletions(-)

Upstream: git.gnome.org


  • Share