[Numpy-discussion] display numpy array as image
Giorgio F. Gilestro
Thu Nov 29 16:48:02 CST 2007
I am not sure I got what you mean but I am using PIL to convert arrays
to images and viceversa
I embed bmps using wxpython.
Zachary Pincus wrote:
> Hello all,
> I'm curious if people have experience with / preferences for how to
> display a numpy array onscreen as an image.
> Pyglet looks relatively easy -- you can feed an image buffer object
> with a string or a ctypes pointer. I presume getting a string from an
> array is plenty fast, but the ctypes pointer option is intriguing as
> it allows for dealing with simple strided arrays (the image objects
> allow for an arbitrary number of bytes between rows). Is it possible
> to get a ctypes pointer to the beginning of the array buffer from
> numpy without too much ugliness?
> wxPython looks pretty easy too, as there are facilities for getting
> pixels from a buffer. Does anyone have any experience with these? Are
> there ways of allowing a numpy array and a wxPython image to point to
> the same memory?
> Anyhow, these are specific questions, but I'd also appreciate any
> general thoughts about good approaches for getting pixels from numpy
> arrays onscreen.
> Numpy-discussion mailing list
More information about the Numpy-discussion