feat(examples) adjust micropython examples to use lv_png (#3639)

This commit is contained in:
Amir Gonnen 2022-08-30 00:12:37 +03:00 committed by GitHub
parent 125b72f010
commit 33d8ca779d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 0 additions and 75 deletions

View File

@ -1,12 +1,7 @@
#!/opt/bin/lv_micropython -i
import lvgl as lv
import display_driver
from imagetools import get_png_info, open_png
from img_wink_png import img_wink_png_map
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
img_wink_png = lv.img_dsc_t(
{

View File

@ -1,11 +1,5 @@
import gc
import lvgl as lv
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Measure memory usage
gc.enable()

View File

@ -1,9 +1,3 @@
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:
with open('../assets/img_cogwheel_argb.png', 'rb') as f:

View File

@ -1,10 +1,3 @@
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
anim_imgs = [None]*3
# Create an image from the png file
try:

View File

@ -1,10 +1,3 @@
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:
with open('../../assets/img_star.png','rb') as f:

View File

@ -1,10 +1,3 @@
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:
with open('../../assets/img_caret_down.png','rb') as f:

View File

@ -2,12 +2,6 @@
import usys as sys
import lvgl as lv
import display_driver
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:

View File

@ -2,12 +2,6 @@
import usys as sys
import lvgl as lv
import display_driver
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:

View File

@ -2,12 +2,6 @@
import usys as sys
import lvgl as lv
import display_driver
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:

View File

@ -1,14 +1,8 @@
from imagetools import get_png_info, open_png
def ofs_y_anim(img, v):
img.set_offset_y(v)
# print(img,v)
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:
with open('../../assets/img_skew_strip.png','rb') as f:

View File

@ -1,10 +1,3 @@
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try:
with open('../../assets/imgbtn_left.png','rb') as f:

View File

@ -2,12 +2,6 @@
import utime as time
import lvgl as lv
import display_driver
from imagetools import get_png_info, open_png
# Register PNG image decoder
decoder = lv.img.decoder_create()
decoder.info_cb = get_png_info
decoder.open_cb = open_png
# Create an image from the png file
try: