donnieh
Dec 02, 2015 - 04:47
Can ui.imageview() display gif images?
Can ui.imageview() display gif images?
ImageView can only display ui.Images... but ui.Image.named() should be able to open a gif, at least of the non animated variety.
https://forum.omz-software.com/topic/2319/multi-frame-gifs-to-clipboard-or-photos might be helpful.
I think he means animated gifs @JonB
It works when using ImageView.load_from_url.
import ui
def load(sender):
url = 'https://img01.sogoucdn.com/app/a/100540022/2019030913484662642362.gif'
img_v.load_from_url(url)
frame = 0, 0, *ui.get_screen_size()
v = ui.View()
v.background_color = 'white'
v.right_button_items = [
ui.ButtonItem(
title='Load',
action=load,
)
]
img_v = ui.ImageView(frame=frame)
img_v.content_mode = ui.CONTENT_CENTER
v.add_subview(img_v)
v.present('fullscreen')
But I really want to know how can I use ui.ImageView to display local gif files.
@mieq see here
@cvp Learn a lot from your script,Thanks again for your help.😆