GNOME Bugzilla – Bug 348222
gtk_pixbuf_scale* () eat memory when resizing to 1x1 and 2x2
Last modified: 2010-07-10 04:08:29 UTC
gtk_pixbuf_scale_simple () can kill a machine with 512MiB of RAM (like mine) using a 1024x768 PNG and resizing it to 1x1. A 1152x864 PNG will kill a 1GiB machine too. Test case: /* gcc -o gdk-pixbuf-scale $(pkg-config --cflags --libs gtk+-2.0) gdk-pixbuf-scale.c */ #include <stdlib.h> #include <gtk/gtk.h> #include <gdk-pixbuf/gdk-pixbuf.h> int main () { GtkWidget *image; GdkPixbuf *pixbuf; gtk_init (NULL, NULL); image = gtk_image_new_from_file ("800x600image.png"); g_assert (image != NULL); pixbuf = gtk_image_get_pixbuf (GTK_IMAGE (image)); g_assert (pixbuf != NULL); gdk_pixbuf_scale_simple (pixbuf, 1, 1, GDK_INTERP_BILINEAR); return EXIT_SUCCESS; }
*** Bug 348170 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 80925 ***