How to use GDK with Quickly
Posted
by
max246
on Ask Ubuntu
See other posts from Ask Ubuntu
or by max246
Published on 2012-06-23T07:53:24Z
Indexed on
2012/06/23
9:25 UTC
Read the original article
Hit count: 295
I trying to use the library gdk for scale down an image and apply it to a GdkImage.
This is the code
pixbuf = Gdk.pixbuf_new_from_file(fileName)
pixbuf = pixbuf.scale_simple(100, 100, Gdk.INTERP_BILINEAR)
The problem is that python can't find Gdk even if I use everything in lowercase
Error: pixbuf = Gdk.pixbuf_new_from_file(fileName) NameError: global name 'Gdk' is not defined
I don't know what should I do because I tried to import Gdk but nothing is changed
© Ask Ubuntu or respective owner