How to convert simple B/W graphic to the dot matrix for the LED display/sign

P

Petr Jakes

I would like to convert simple B/W graphic to the 432x64 pixel matrix.
It is intended to display this graphic on the one color LED matrix
sign/display (432 LEDs width, 64 LEDs height).
I am experimenting with the PIL, but I did not find solution there.

It will be really helpful If somebody here can show me the direction
to go?

Regards
Petr
 
S

Steven D'Aprano

I would like to convert simple B/W graphic to the 432x64 pixel matrix.
It is intended to display this graphic on the one color LED matrix
sign/display (432 LEDs width, 64 LEDs height). I am experimenting with
the PIL, but I did not find solution there.

It will be really helpful If somebody here can show me the direction to
go?

What file format is the graphic in? How big is it?

What file format do you want it to be?
 
P

Petr Jakes

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.
 
M

Max Erickson

Petr Jakes said:
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,191
Latest member
BuyKetoBeez

Latest Threads

Top