display monochromatic images wxPython

Francesco Bochicchio bockman at virgilio.it
Sat Apr 26 05:28:39 EDT 2008


On Fri, 25 Apr 2008 14:42:17 -0700, wongjoekmeu at yahoo.com wrote:

> Dear All,
> I want to write a GUI program with wxPython displaying an image. But
> the image I have is monochromatic. When I retrieve the data from the
> image I end up with a list of integer. Starting from a list of integer
> and knowing the width and height of the image, how do I display such
> an image on a wx panel or frame ? I have had a look at the wxPython
> demo but there I see only images where the data is a list of tuple
> consisting of r,g ,b values. Is there are function where I directly
> can input the list of array and let it display the image ?
> Thanks in advance
> 
> RR

I think that RGB colors with the same amount of R,G, and B levels always
result in some shade of gray. If so, you could try building your image
data by convering each numver in a triplet of equal numbers.

Ciao
----
FB



More information about the Python-list mailing list