[Pyrex] pyrex and GIMP
Kevin Turner
acapnotic at twistedmatrix.com
Tue Oct 5 08:46:42 CEST 2004
I've been working on using Pyrex for a GIMP plug-in. It works now. If
that sounds interesting to you, there's a link to the code at
http://gimp-plug-ins.sourceforge.net/refract/
The parts implemented in Pyrex are a PixelFetcher, functions for
calculating displacement and interpolation, and the main processing loop
iterating over a row buffer. The speed is comparable to the C version
(within 5% on my 256x256 test image). I haven't tried a pure Python or
a Python+psyco implementation yet.
I'm not sure yet how to distribute the pyrex definitions for libgimp.
Since I only have one program using it so far, I'm distributing it all
in one tarball and linking "pyxgimp.pxd" into the source directory.
There are some sloppy bits where I convert between pygimp classes (the
libgimp Python bindings included with GIMP) and my pyrex ones.
Eventually, I should pick a set of bindings and stick with them, but
there's much of pygimp's functionality I haven't duplicated yet. The
things in libgimp I wrapped with pyrex are Drawable, Tile, and
PixelRegion -- the structures I needed to access in my pixel processing
loop.
--
The moon is last quarter, 63.6% illuminated, 20.9 days old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20041004/06cd9cb8/attachment.bin
More information about the Pyrex
mailing list