Tessa Lau wrote:
> 
> There seems to be another problem.  When I do the following, I get
> unexpected output:
> 
> >>> img = GdkImlib.Image(filename)
> >>> img.render()
> 1
> >>> pix = img.make_pixmap()
> >>> print pix
> <gtk.GtkPixmap instance at 80f28b8>
> >>> pmap, mask = img.get_pixmap()
> Gdk-CRITICAL **: file gdkwindow.c: line 716 (gdk_window_ref): assertion
> `window != NULL' failed.
> 
> Do I have to do something to the image before getting its pixmap?
> 
This apparently is a bug in PyGTK's GdkImlib module (or in Imlib itself).
It should work fine if you add a "img.render()" just before the "get_pixmap"-
line. Maybe "make_pixmap" does some changes to the image which shouldn't be...


> Also, I looked at two Imlib-based image viewers written in C, and they both
> set the backing pixmap using gdk_window_set_back_pixmap and
> gdk_window_clear.  Why aren't these functions available in the Python
> wrapper?

Yes, why? I am missing them, too!

> 
> I'm trying to make a slideshow app, and using the gtk_pixmap_set method to
> switch images results in flickering in the display, whereas the C image
> viewers (electric eyes and gqview) don't have any flickering when they
> change images.
> 
You could use GdkPixmaps and double buffering to avoid flickering.


Martin Grimme - http://www.pycage.de


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to