Arnd Baecker wrote: > Does the ".tostring()" part cost a lot of performance?
Well, I think you get at least two copies of the data: one to make the string, and then another one to make the wx.image. It would be nice to just pass a pointer to the data buffer right through to wx.Image. Fredrik, Have you seen the new "array interface" put out by the NumPy folks? http://numeric.scipy.org/array_interface.html It's not intended to by NumPy specific. the idea is to have a standard interface so that different Python extensions that need to pass blocks of homogeneous data around (like images, for instance) could have a standard interface for doing so. That way each extension only needs to know about the interface, not each other extension it might need to work with. This could be a lot more efficient than using PyStrings to pass data around. I'm hoping to implement it in wxPython for just this kind of thing. It would be great if PIL did it too. I know a lot of folks do work with PIL images and NumPy arrays. The Python Buffer object is another option. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
