Did anyone actually deal with developing an C/C++ extension library for
Python, which deals with numarray arrays; and interfacing it to Python
scripts using swig?
My motivation to use C is to optimize the most time-consuming
operations.
My problem is to convert, at the shortest possible time, few arrays of
float values into an array of RGB pixel colors according to some
complicated rules.
The current pure Python full processing flow is as follows:
1. Arithmetic and function operations on the values of some
numarray.array() variables.
2. Given the above variables, building a string of bytes, which are RGB
values of pixels.
3. Conversion of the string into Image using Image.fromstring() from the
Image module.
4. Conversion from Image into format, which can be drawn on Tk.Canvas
using ImageTk.PhotoImage().
5. Drawing the PhotoImage into canvas.
Step (4) above ought to be redundant. Is there any way to directly
create an ImageTk.PhotoImage() instance from a string (using C/C++ magic
is OK)?
--- Omer
--
Jara Cimrman. A name to remember.
My own blog is at http://tddpirate.livejournal.com/
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html