Skip to content

Commit d8f0c8b

Browse files
committed
Fix README rendering
1 parent e359f7e commit d8f0c8b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.rst

+17-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,23 @@ Only certain types of bitmaps work with this library, and they often have to be
2323
Usage Example
2424
=============
2525

26-
.. literalinclude:: ../examples/imageload_simpletest.py
26+
.. code-block:: python
27+
28+
import board
29+
import displayio
30+
import adafruit_imageload
31+
32+
image, palette = adafruit_imageload.load(
33+
"images/4bit.bmp", bitmap=displayio.Bitmap, palette=displayio.Palette
34+
)
35+
tile_grid = displayio.TileGrid(image, pixel_shader=palette)
36+
37+
group = displayio.Group()
38+
group.append(tile_grid)
39+
board.DISPLAY.show(group)
40+
41+
while True:
42+
pass
2743
2844
Contributing
2945
============

0 commit comments

Comments
 (0)