8000 PNG image offset by 1 line · Issue #91 · adafruit/Adafruit_CircuitPython_ImageLoad · GitHub
[go: up one dir, main page]

Skip to content
PNG image offset by 1 line #91
Closed
@Neradoc

Description

@Neradoc

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.

Test image: test_pattern

matrix

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0