Skip to content

Commit 96ab9ff

Browse files
authored
Merge pull request adafruit#7648 from gamblor21/ondiskgif_doc_fix
OnDiskGif Documentation Example fix
2 parents 26bab62 + ce3da1e commit 96ab9ff

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

shared-bindings/gifio/OnDiskGif.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,21 @@
4343
//| import displayio
4444
//| import time
4545
//|
46+
//| display = board.DISPLAY
4647
//| splash = displayio.Group()
47-
//| board.DISPLAY.show(splash)
48+
//| display.root_group = splash
4849
//|
4950
//| odg = gifio.OnDiskGif('/sample.gif')
5051
//| odg.next_frame() # Load the first frame
51-
//| face = displayio.TileGrid(odg, pixel_shader=displayio.ColorConverter(input_colorspace=displayio.Colorspace.RGB565))
52+
//| # Depending on your display the next line may need Colorspace.RGB565 instead of Colorspace.RGB565_SWAPPED
53+
//| face = displayio.TileGrid(odg.bitmap, pixel_shader=displayio.ColorConverter(input_colorspace=displayio.Colorspace.RGB565_SWAPPED))
5254
//| splash.append(face)
5355
//| board.DISPLAY.refresh()
5456
//|
5557
//| # Wait forever
5658
//| while True:
57-
//| gif.next_frame()
58-
//| time.sleep(0.1)"""
59+
//| next_delay = odg.next_frame()
60+
//| time.sleep(next_delay)"""
5961
//|
6062
//| def __init__(self, file: str) -> None:
6163
//| """Create an OnDiskGif object with the given file.

0 commit comments

Comments
 (0)