Code: Select all
#! /usr/bin/env python
import time
from PIL import Image, ImageDraw
from rgbmatrix import RGBMatrix, RGBMatrixOptions
options = RGBMatrixOptions()
options.chain_length = 2
options.cols = 32
options.rows = 64
options.parallel = 1
options.brightness = 100
options.disable_hardware_pulsing = True
options.drop_privileges = 1
options.gpio_slowdown = 1
options.hardware_mapping = 'adafruit-hat'
options.inverse_colors = False
options.led_rgb_sequence = "RGB"
options.multiplexing = 0
options.pixel_mapper_config = ''
options.pwm_bits = 11
options.pwm_dither_bits = 0
options.pwm_lsb_nanoseconds = 130
options.row_address_type = 0
options.scan_mode = 0
options.show_refresh_rate = False
matrix = RGBMatrix(options=options)
image = Image.new("RGB", size=(64, 32))
draw = ImageDraw.Draw(image)
draw.rectangle((0, 0, 63, 31), fill=(0, 0, 0), outline=(0, 0, 255)) # here max is always 16!!!!!! all values higher get ignored (like 31)
draw.rectangle((2, 2, 61, 13), fill=(0, 0, 0), outline=(255, 0, 0))
matrix.Clear()
matrix.SetImage(image)
time.sleep(10)
matrix.Clear()
The issue is that all height values (greater 16) are ignored!!!! Does someone see my issue and can share some help?
Note: the picture shows that the blue rectangle is max. 16