Closed
Description
Using Circuitpyhton 9.2.2 the following code and this PNG image, when showed on a screen (in this case a matrix portal so we can see the pixels), the first line is black, and the other lines are all shifted one line down, and the last line is missing. This does not happen with a BMP (on the right). I haven't had time to do other tests.
import displayio
import vectorio
import adafruit_imageload
# import board
# display = board.DISPLAY
from adafruit_matrixportal.matrix import Matrix
matrix = Matrix()
display = matrix.display
display.rotation = 180
display.root_group = displayio.Group()
color_palette = displayio.Palette(1)
color_palette[0] = 0x404000 # dark background for the Matrix Portal
display.root_group.append(vectorio.Rectangle(
pixel_shader=color_palette,
width=display.width, height=display.height,
))
image, palette = adafruit_imageload.load(f"test_pattern.png")
display.root_group.append(displayio.TileGrid(image, pixel_shader=palette, x=2, y=2))
while True:
pass
Metadata
Metadata
Assignees
Labels
No labels