The attached patch make evolution uses gnome_thumbnail_scale_down_pixbuf instead of gdk_pixbuf_scale_simplified if it is available (ie on GNOME platform >= 2.2), which fixes big performance problem when it tries to scale down big images (see bug http://qa.mandrakesoft.com/show_bug.cgi?id=6065 ). It also seems mini pixbuf is re-computed when switching from open to close for inline attachement (I didn't fix this problem).
This is a known problem in gdk_pixbuf_scale (which can be workarounded by using gdk_pixbuf_loader_set_size, only with GTK+ 2.2). Can I commit this to CVS (both branches, I guess) ? -- Frederic Crozat <[EMAIL PROTECTED]> Mandrakesoft
? .mail-display.c.swp ? evolution-1.4.5-scaledown.patch ? evolution-1.4.5-utf8user.patch ? evolution-1.4.5-utf8user1.patch Index: ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/mail/ChangeLog,v retrieving revision 1.2761.2.31 diff -u -r1.2761.2.31 ChangeLog --- ChangeLog 6 Oct 2003 18:44:23 -0000 1.2761.2.31 +++ ChangeLog 7 Oct 2003 15:49:43 -0000 @@ -1,3 +1,9 @@ +2003-10-07 Frederic Crozat <[EMAIL PROTECTED]> + + * mail-display.c: (pixbuf_gen_idle): + Use gnome-thumbnail_scale_down_pixbuf if available, + for better performance. + 2003-10-03 Frederic Crozat <[EMAIL PROTECTED]> * mail-config-druid.c (identity_prepare), (config_wizard_new): Index: mail-display.c =================================================================== RCS file: /cvs/gnome/evolution/mail/Attic/mail-display.c,v retrieving revision 1.282.4.8 diff -u -r1.282.4.8 mail-display.c --- mail-display.c 18 Sep 2003 08:44:11 -0000 1.282.4.8 +++ mail-display.c 7 Oct 2003 15:49:45 -0000 @@ -52,6 +52,9 @@ #include <gdk/gdkkeysyms.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf-loader.h> +#ifdef GNOME_THUMBNAIL_H +#include <libgnomeui/gnome-thumbnail.h> +#endif #include <gal/util/e-util.h> #include <gal/widgets/e-popup-menu.h> @@ -710,7 +713,11 @@ } } +#ifdef GNOME_THUMBNAIL_H + mini = gnome_thumbnail_scale_down_pixbuf (pixbuf, width, height); +#else mini = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR); +#endif if (error || !pbl->mstream) g_object_unref (pixbuf);
