Skip to content

Commit b2ae8d7

Browse files
FoamyGuymatt-land
authored andcommitted
adding example for inflator
1 parent 2357c03 commit b2ae8d7

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# SPDX-FileCopyrightText: 2022 Tim Cocks for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
4+
import board
5+
import displayio
6+
import adafruit_imageload
7+
from adafruit_imageload.tilegrid_inflator import inflate_tilegrid
8+
9+
image, palette = adafruit_imageload.load("images/castle_spritesheet.bmp")
10+
tile_grid = inflate_tilegrid(bmp_obj=image, bmp_palette=palette, target_size=(10, 8))
11+
12+
group = displayio.Group()
13+
group.append(tile_grid)
14+
board.DISPLAY.show(group)
15+
16+
while True:
17+
pass
1.28 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT

0 commit comments

Comments
 (0)