On Tue, Mar 24, 2009 at 10:46 AM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:
> canvas = gcf().canvas
> buf = canvas.tostring_rgb()
>
> img = numpy.fromstring(buf, numpy.uint8)
> im_size = canvas.get_width_height()
> rgb = img.reshape(im_size[1], im_size[0], 3)
> r, g, b = rgb[:,:,0], rgb[:,:,1], rgb[:,:,2]
>
Perhaps we should make this a friendly helper method of the agg backend
canvas -- canvas.toarray() returns an rgba numpy array via
canvas.buffer_rgba?
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users