changeset 2127:c305a43d60c7

[gaim-migrate @ 2137] whoops, forgot this part. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 06 Aug 2001 18:28:44 +0000
parents b935eca131be
children bc79be34eb73
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Mon Aug 06 18:22:59 2001 +0000
+++ b/src/protocols/oscar/oscar.c	Mon Aug 06 18:28:44 2001 +0000
@@ -3187,6 +3187,7 @@
 	GdkPixbufLoader *load;
 	GList *frames;
 	GdkPixbuf *buf;
+	GdkPixbuf *scale;
 	GdkPixmap *pm;
 	GdkBitmap *bm;
 
@@ -3208,7 +3209,14 @@
 	if (ir->anim) {
 		frames = gdk_pixbuf_animation_get_frames(ir->anim);
 		buf = gdk_pixbuf_frame_get_pixbuf(frames->data);
-		gdk_pixbuf_render_pixmap_and_mask(buf, &pm, &bm, 0);
+		scale = gdk_pixbuf_scale_simple(buf,
+				gdk_pixbuf_get_width(buf) * SCALE /
+					gdk_pixbuf_animation_get_width(ir->anim),
+				gdk_pixbuf_get_height(buf) * SCALE /
+					gdk_pixbuf_animation_get_height(ir->anim),
+				GDK_INTERP_NEAREST);
+		gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 0);
+		gdk_pixbuf_unref(scale);
 
 		if (gdk_pixbuf_animation_get_num_frames(ir->anim) > 1) {
 			int delay = MAX(gdk_pixbuf_frame_get_delay_time(frames->data), 13);
@@ -3221,7 +3229,10 @@
 			gdk_pixbuf_loader_close(load);
 			return;
 		}
-		gdk_pixbuf_render_pixmap_and_mask(ir->unanim, &pm, &bm, 0);
+		scale = gdk_pixbuf_scale_simple(ir->unanim, SCALE, SCALE,
+				GDK_INTERP_NEAREST);
+		gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 0);
+		gdk_pixbuf_unref(scale);
 	}
 
 	ir->pix = gtk_pixmap_new(pm, bm);