GIF的展示



import PySimpleGUI as sg

layout = [[sg.Image(filename='your_gif.gif', key='-IMAGE-')]]

window = sg.Window('Animation Demo', layout)

while True:
    event, values = window.read(timeout=100)
    if event == sg.WINDOW_CLOSED:
        break
    window['-IMAGE-'].update_animation('your_gif.gif', time_between_frames=100)

window.close()

你可能感兴趣的:(前端,javascript,linux)