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色和标准调色板,否则显示效果可能不好
-
-
- 8回复总数
- 1751 阅读次数
- 最新文章 由 zwjiang
2021年 7月 26日 09:40
-
-
- 2回复总数
- 1395 阅读次数
- 最新文章 由 alexchow
2022年 1月 18日 16:59
-
-
- 9回复总数
- 2059 阅读次数
- 最新文章 由 dexter
2021年 7月 27日 10:17