Petr Jakes <petr.jakes....@gmail.com> wrote: > >> What file format is the graphic in? How big is it? >> >> What file format do you want it to be? >> > > Now, I am able to create the png file with the resolution 432x64 > using PIL (using draw.text method for example). > > I would like to get the 432x64 True/False (Black/White) lookup > table from this file, so I can switch LEDs ON/OFF accordingly. > > -- > Petr >
The convert and load methods are one way to do it: >>> import Image >>> im=Image.new('L', (100,100)) >>> im=im.convert('1') >>> px=im.load() >>> px[0,0] 0 That's the numeral one in the argument to convert. The load method returns a pixel access object. Max -- http://mail.python.org/mailman/listinfo/python-list