Python Imaging Library and PyGTK - color image path?

Jeremy Bowers jerf at jerf.org
Sat Apr 23 00:02:21 EDT 2005


On Fri, 22 Apr 2005 22:43:13 -0400, Jeremy Bowers wrote:
> (Use case, in case it matters: I am trying to embed a graphic into a text
> widget. This is going fine. Because I want the text widget to be able use
> different size text, and no one image can look right with everything from
> 8pt to 40pt text (all reasonable possibilities), I load a large image in
> from the disk and scale it down as needed; the images are designed to
> scale well and later I can make multiple source images if that is
> desirable. But I can't figure out how to get the scaled image into GTK.
> This surprises me.)

As usual, posting for help after poking around for a long while guarantees
you'll figure it out in the next few minutes. You need to create GDK
pixbufs, which can be resized and scaled and stuff.

There is definitely some room for confusion here with GTK Images, GDK
Images, GTK pixbufs, and GDK pixbufs....



More information about the Python-list mailing list