acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

lv_example_gif_1.py (650B)

      1 #!/opt/bin/lv_micropython -i
      2 import lvgl as lv
      3 import display_driver
      4 import fs_driver
      5 from img_bulb_gif import img_bulb_gif_map
      6 
      7 fs_drv = lv.fs_drv_t()
      8 fs_driver.fs_register(fs_drv, 'S')
      9 #
     10 # Open a GIF image from a file and a variable
     11 #
     12 img_bulb_gif = lv.img_dsc_t(
     13     {
     14         "header": {"always_zero": 0, "w": 0, "h": 0,  "cf": lv.img.CF.RAW},
     15         "data_size": 0,
     16         "data": img_bulb_gif_map,
     17     }
     18 )
     19 img1 = lv.gif(lv.scr_act())
     20 img1.set_src(img_bulb_gif)
     21 img1.align(lv.ALIGN.RIGHT_MID, -150, 0)
     22 
     23 img2 = lv.gif(lv.scr_act())
     24 # The File system is attached to letter 'S'
     25 
     26 img2.set_src("S:bulb.gif")
     27 img2.align(lv.ALIGN.RIGHT_MID, -250, 0)