[Numpy-discussion] drawing with NumPy and PythonCard

Kevin Altis altis at semi-retired.com
Mon Oct 8 10:38:13 EDT 2001

I'm the coordinator for the PythonCard project, which is at:

PythonCard provides a GUI framework for building Python applications. The
project is relatively new, but there are a large number of sample
applications, including a number of drawing and visualization samples.
PythonCard already supports loading and drawing of common formats like XBM,
GIF, JPEG, PNG, etc. from disk files.

Last month I started a BitmapCanvas for the framework to simplify
interactive drawing. Rather than duplicate all of the functionality of the
Python Imaging Library (PIL) or the various plotting packages already
available, I want to make it easy to display results created with other
drawing packages and numPy in PythonCard. To that end, the Bitmap and
BitmapCanvas class already support PIL. You can convert a PIL RGB image
to/from a PythonCard bitmap and you can draw a PIL RGB image in a
BitmapCanvas at a given x, y location. If you're already converting from
numPy to PIL, you should be able to show your results in PythonCard today. I
will be making a related post about this on the image-sig.

Anyway, what I would like to do is provide similar methods to make it easy
to convert numPy arrays to images or a bitmap to numPy without having to go
to PIL first. I don't currently use numPy since I don't do any scientific
computing (and my math skills are pretty pathetic) and most of my programs
are text or database-oriented, so I'm relying on others to spec out the
features they need or want. Eventually, I would like to add some visual
effects to PythonCard such as wipes and fades which would be a perfect use
of arrays. I want to make sure that PythonCard provides a good GUI framework
for the scientific community. I would appreciate any suggestions, pointers
to related resources, etc.

PythonCard currently sits on top of wxPython, so if you are already working
with numPy and wxPython I would be very interested to hear about it. If you
would like to get more actively involved, please join the PythonCard mailing
list, which is probably a better place for longer-term discussions than the
numPy list.


Kevin Altis
altis at semi-retired.com

More information about the NumPy-Discussion mailing list