adafruit_imageload + PNG
hi! I have a png file (source here https://developer.lametric.com/content/apps/icon_thumbs/52160)
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
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
so. my question is - what I am doing wrong?
It's unclear what your question is. I can see in one photo that the transparent sections of the PNG are not working, but I can't tell under what conditions this succeeds or fails from your message.
The two blocks of code in your post appear to be identical, perhaps there was intended to be some difference between them?
Or are these two tests run with two different files that were exported with different configurations maybe?
If you can describe a bit more about what you are trying to do and your goal it may be easier to help
It's unclear what your question is. I can see in one photo that the transparent sections of the PNG are not working, but I can't tell under what conditions this succeeds or fails from your message.
The two blocks of code in your post appear to be identical, perhaps there was intended to be some difference between them?
Or are these two tests run with two different files that were exported with different configurations maybe?
If you can describe a bit more about what you are trying to do and your goal it may be easier to help my FAIL!
first case: bit_depth=2, 2nd case: bit_depth=6
If you can describe a bit more about what you are trying to do and your goal it may be easier to help just want to see my pic
on the display https://www.waveshare.com/wiki/Pico-RGB-Matrix-P3-64x32
but as you can see no luck - palette is wrong.