adafruit / adafruit/Adafruit_CircuitPython_ImageLoad

adafruit_imageload + PNG

Open
#103 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16
Forks
23
PR merge metrics
No merged PRs in 30d

Description

hi!
I have a png file (source here https://developer.lametric.com/content/apps/icon_thumbs/52160)

Image

`bit_depth=2`
```
import board
import displayio
import rgbmatrix
import framebufferio
import adafruit_imageload

displayio.release_displays()

matrix = rgbmatrix.RGBMatrix(
width=64, bit_depth=2,
rgb_pins=[board.GP2, board.GP3, board.GP4, board.GP5, board.GP8, board.GP9],
addr_pins=[board.GP10, board.GP16, board.GP18, board.GP20],
clock_pin=board.GP11, latch_pin=board.GP12, output_enable_pin=board.GP13,
doublebuffer=True)
display = framebufferio.FramebufferDisplay(matrix, auto_refresh=True,rotation=180)

display.rotation = 0

g = displayio.Group()
b, p = adafruit_imageload.load("images/w-rainy.png")
t = displayio.TileGrid(b, pixel_shader=p, x=20, y=10)
g.append(t)

display.root_group = g

while True:
pass

```

![Image](https://github.com/user-attachments/assets/19e1c567-c7d2-440a-984d-c0324fe1c609)

some changes....
`bit_depth=6`
```
import board
import displayio
import rgbmatrix
import framebufferio
import adafruit_imageload

displayio.release_displays()

matrix = rgbmatrix.RGBMatrix(
width=64, bit_depth=6,
rgb_pins=[board.GP2, board.GP3, board.GP4, board.GP5, board.GP8, board.GP9],
addr_pins=[board.GP10, board.GP16, board.GP18, board.GP20],
clock_pin=board.GP11, latch_pin=board.GP12, output_enable_pin=board.GP13,
doublebuffer=True)
display = framebufferio.FramebufferDisplay(matrix, auto_refresh=True,rotation=180)

display.rotation = 0

g = displayio.Group()
b, p = adafruit_imageload.load("images/w-rainy.png")
t = displayio.TileGrid(b, pixel_shader=p, x=20, y=10)
g.append(t)

display.root_group = g

while True:
pass
```

![Image](https://github.com/user-attachments/assets/4a875e78-1a6e-435f-a8a4-05e0c2c979e1)

so. my question is - what I am doing wrong?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.