John, I've got draw_image() displaying an image for cairo
> and gtkcairo backends and have a few questions. - Why does
> draw_image() not have a gc argument like the other
> draw_methods? - What is the Image class image format or
> formats(s) ? Is it an array of float32 and RGBA32? -
> image_demo.py, image_demo2.py are working but colors are
> not same as gtkagg, Cairo supports A1, A8, RGB24 and ARGB32
I added a buffer_argb32 method to _image.cpp to return the image as a
python buffer object in ARGB32 format in CVS. I haven't tested it
extensively, just that the following doesn't crash and burn
from matplotlib.matlab import *
im = imshow(rand(5,5))
_im = im.make_image(flipy=False)
print _im, dir(_im)
b = _im.buffer_argb32()
print len(b)
im is an image.AxesImage, _im is an _image.Image object from extension
code, the same thing draw_image gets.
As an aside, after you get your backend finished, you may also want to
run unit/memleak_hawaii3.py with the latest Numeric or numarray CVS to
identify any potential memory leaks.
JDH