Re: Speeding up an image transformation in C

Fredrik Lundh <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
There's a brief note here:

    http://effbot.org/zone/pil-extending.htm

You can simplify the dependencies by simply copying the Imaging
definition to your own code -- the "im.id" attribute used in that
article is guaranteed to give you a pointer to that structure (that
is, if the structure ever changes, PIL will provide a different
mechanism to access the internal image descriptor).

Another approach is to use tostring/fromstring in a wrapper, and write
a C extension that works on a byte string or buffer object.

</F>

On Mon, Nov 9, 2009 at 5:24 PM, Grzegorz Adam Hankiewicz
<[email protected]> wrote:
> Hello.
>
> I have a small python algorithm similar to a floodfill that works slow in
> python. Is there any documentation on how I could write a C extension to
> speed it up? Are there any dev headers I can compile against to handle an
> Image from C?
> _______________________________________________
> Image-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/image-sig
>
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.