[PYTHON] Image reduction (LED matrix panel 16 x 32)

Reduce the ppm file to create an image to be displayed on the RGB matrix panel 16x32.

1. Library

pip install Pillow

resize.py


encoding:UTF-8
#-*- codinf:utf-8 -*-
from PIL import Image

img = Image.open("{Jpg file before conversion}")
width, height = img.size

img = img.resize((int(img.width / (img.height / 16 )), 16))
img.save("{Converted ppm file}")

2. Run

python resize.py

Recommended Posts

Image reduction (LED matrix panel 16 x 32)
Control the Matrix LED panel from ROS
Image reduction (LED matrix panel 16 x 32)
Control the Matrix LED panel from ROS
Control the Matrix LED panel from ROS