LoginSignup
0
0

More than 3 years have passed since last update.

画像縮小(LEDマトリクスパネル 16×32)

Posted at

ppmファイルを縮小して、RGBマトリクスパネル16×32に表示する画像を作ります。

1.ライブラリ

pip install Pillow

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

img = Image.open("{変換前jpgファイル}")
width, height = img.size

img = img.resize((int(img.width / (img.height / 16 )), 16))
img.save("{変換後ppmファイル}")

2.実行

python resize.py

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0