[cairo] Get pixeldata from image

Behdad Esfahbod behdad at behdad.org
Mon Nov 20 20:06:51 PST 2006


On Mon, 2006-11-20 at 22:00 -0500, Steve Chaplin wrote:
> 
> There is one other problem function I can think of.
>     surface = cairo.ImageSurface.create_for_array (array)
> where 'array' is a Numerical Python array
> 
> I don't think adding an array interface to cairo would be that useful.
> But for Python users 'create_for_array' may be useful. 

Isn't it more Pythonesque to make create_for_data() understand an array?
Or does the create_for_array() create a copy of the data while
create_for_data doesn't? Ick.

-- 
behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
        -- Dan Bern, "New American Language"



More information about the cairo mailing list