Adafruit CircuitPython相关
MicroPython重要分支
-
shaoziyang
- 帖子: 3917
- 注册时间: 2019年 10月 21日 13:48
#1
帖子
由 shaoziyang »
使用
adafruit_imageload 库(需要预先将adafruit_imageload库复制到CLUE中),就可以在clue上显示图像,参考代码如下:
代码: 全选
import displayio
import adafruit_imageload
from adafruit_clue import clue
bmp, pal = adafruit_imageload.load("g.bmp")
background = displayio.TileGrid(bmp, pixel_shader=pal)
splash = displayio.Group(max_size=5)
splash.append(background)
clue.display.show(splash)
注:
- 图像大小不能超过240x240
- 受芯片RAM限制,图像文件大小不能太大,最好小于30KB
- 图像使用bmp格式,最好用16色和标准调色板,否则显示效果可能不好
-
-
- 13回复总数
- 793 阅读次数
- 最新文章 由 czfx
2023年 8月 23日 06:11
-
-
- 2回复总数
- 174 阅读次数
- 最新文章 由 zwjiang
2023年 8月 23日 09:07
-
-
- 1回复总数
- 391 阅读次数
- 最新文章 由 shaoziyang
2023年 8月 23日 09:32