comparison src/gtkconv.c @ 11324:772d086e9067

[gaim-migrate @ 13535] Use a better scaling method. Was there any particular reason this was using GTK_INTERP_NEAREST? From the GDK docs: "Nearest neighbor sampling; this is the fastest and lowest quality mode. Quality is normally unacceptable when scaling down, but may be OK when scaling up." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 22 Aug 2005 21:41:15 +0000
parents 421007f39e53
children 17142948653e
comparison
equal deleted inserted replaced
11323:caec745e390e 11324:772d086e9067
2507 scale = gdk_pixbuf_scale_simple(buf, 2507 scale = gdk_pixbuf_scale_simple(buf,
2508 MAX(gdk_pixbuf_get_width(buf) * scale_width / 2508 MAX(gdk_pixbuf_get_width(buf) * scale_width /
2509 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1), 2509 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1),
2510 MAX(gdk_pixbuf_get_height(buf) * scale_height / 2510 MAX(gdk_pixbuf_get_height(buf) * scale_height /
2511 gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1), 2511 gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1),
2512 GDK_INTERP_NEAREST); 2512 GDK_INTERP_BILINEAR);
2513 2513
2514 gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); 2514 gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100);
2515 g_object_unref(G_OBJECT(scale)); 2515 g_object_unref(G_OBJECT(scale));
2516 gtk_image_set_from_pixmap(GTK_IMAGE(gtkconv->u.im->icon), pm, bm); 2516 gtk_image_set_from_pixmap(GTK_IMAGE(gtkconv->u.im->icon), pm, bm);
2517 g_object_unref(G_OBJECT(pm)); 2517 g_object_unref(G_OBJECT(pm));
5795 scale = gdk_pixbuf_scale_simple(buf, 5795 scale = gdk_pixbuf_scale_simple(buf,
5796 MAX(gdk_pixbuf_get_width(buf) * scale_width / 5796 MAX(gdk_pixbuf_get_width(buf) * scale_width /
5797 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1), 5797 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1),
5798 MAX(gdk_pixbuf_get_height(buf) * scale_height / 5798 MAX(gdk_pixbuf_get_height(buf) * scale_height /
5799 gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1), 5799 gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1),
5800 GDK_INTERP_NEAREST); 5800 GDK_INTERP_BILINEAR);
5801 5801
5802 gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); 5802 gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100);
5803 g_object_unref(G_OBJECT(scale)); 5803 g_object_unref(G_OBJECT(scale));
5804 5804
5805 5805