>> And the harder question.  I need access to the address of the raw image
>> buffer.  (I assume this is a contiguous block of c-allocated memory?)
>> Presently, I copy into a ctypes buffer but this slows things down
>> significantly.  Is there an alternative approach?

I'm assuming you're using the Agg backend.  If so, you can get the raw 
memory wrapped in a Python buffer object as follows:

   figureCanvas.get_renderer().buffer_rgba(x, y)

(where x, y is the upper left corner in the plot of the area you want to 
get.)  It should be possible in C side to then get the address out of 
that using the Python/C API.

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to