View Single Post
Old 01-03-2017, 02:09 AM   #1
maggch
Junior Member
maggch began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2017
Device: kpw2
glib.GError: Image tpye 'png' is not supported

I learned to develop application for kindle yesterday.I used the PyGTK package here.I extract that to \extensions\python.Then I tried to develop a simple painter.however,when i want to save the image

Code:
    width,height = pixmap.get_size()
    pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, width, height)
    pixbf = pixbuf.get_from_drawable(pixmap, pixmap.get_colormap(), 0, 0, 0, 0, width, height)
    pixbf.save('path.png','png')

glib.GError: Image tpye 'png' is not supported

how to make glib support png?
maggch is offline   Reply With Quote