From 724d8b7056020a478f1c55f2a31e318f727ddf8a Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sat, 23 Feb 2008 12:23:15 +0000 Subject: [PATCH] scale up image --- tools/cleanroom/images.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/cleanroom/images.py b/tools/cleanroom/images.py index 8639231a..5e04c539 100644 --- a/tools/cleanroom/images.py +++ b/tools/cleanroom/images.py @@ -33,6 +33,14 @@ class ImagesExample: # buttons image = gtk.Image() image.set_from_file("../../patches/wall40_1.gif") + pixbuf = image.get_pixbuf() + if pixbuf: + scale = 2 + image.set_from_pixbuf(pixbuf.scale_simple( + pixbuf.get_width() * scale, + pixbuf.get_height() * scale, + gtk.gdk.INTERP_NEAREST + )) image.show() # a button to contain the image widget button = gtk.Button()