Welcome to WSL!

Make yourself at home, but before posting, please may I ask you to read the following topics.


Posting 101
Server space, screenshots, and you

Thank you!

PS. please pretty please:


Image

Gif image animation in UI Fusion

User avatar
aep
Posts: 6
Joined: Wed Mar 13, 2019 11:41 am

Gif image animation in UI Fusion

#1

Post by aep » Mon Apr 29, 2019 2:38 pm

Hi!) I searched for a long time, but did not find the answer on the forum.
How to add a gif to UI?

Thanks)


User avatar
SecondMan
Site Admin
Posts: 4501
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 28
Location: Vancouver, Canada
Been thanked: 121 times
Contact:

Re: Gif image animation in UI Fusion

#2

Post by SecondMan » Tue Apr 30, 2019 1:43 pm

Intriguing question - what exactly is it what you are trying to do? Your question is a little vague...


User avatar
aep
Posts: 6
Joined: Wed Mar 13, 2019 11:41 am

Re: Gif image animation in UI Fusion

#3

Post by aep » Sun Dec 08, 2019 8:54 am

SecondMan wrote:
Tue Apr 30, 2019 1:43 pm
Intriguing question - what exactly is it what you are trying to do? Your question is a little vague...
I use this script, but animation in image (gif) not work :(
viewtopic.php?p=10500#p10500

Can you help me?

User avatar
AndrewHazelden
Fusionator
Posts: 1656
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 9
Location: West Dover, Nova Scotia, Canada
Been thanked: 32 times
Contact:

Re: Gif image animation in UI Fusion

#4

Post by AndrewHazelden » Sun Dec 08, 2019 9:32 am

AFAIK .gif image loading support (and by extension .gif animations) are not possible in Fusion 9's version of UI Manager, so you will have to use a series of PNG format images if you want things to work.

The good news is there are some improved HTML rendering features in Fusion/Resolve v16.1+ along with the new ui:Timer() function that may (in time) give you an alternative workflow solution for smooth and consistent image sequence playback in your custom UIs that could play and loop forever. As always, the issue is there is a Fusion v16 scripting API documentation shortage that would be required to explain a few of the required fine details...

In the short term, for a single shot image sequence playback approach you could try loading the images one at a time via a ui:Icon() placed on a ui:Button(), or via ui:TextEdit field's HTML mode and control the playback rate via a "blocking" delay function like bmd.wait().

FYI: For a Lua script that works with an image sequence made from a series of PNGs, it might be easier to use the full absolute file path to each image sequence PNG frame on disk via expanding the PathMap URL instead of doing the base64 image encoding thing. A PNG format image sequence would tend to add a lot of file size to your script as based64 data. :)
Last edited by AndrewHazelden on Sun Dec 08, 2019 10:03 am, edited 1 time in total.

User avatar
aep
Posts: 6
Joined: Wed Mar 13, 2019 11:41 am

Re: Gif image animation in UI Fusion

#5

Post by aep » Sun Dec 08, 2019 9:44 am

AndrewHazelden wrote:
Sun Dec 08, 2019 9:32 am
Поддержка загрузки изображений AFAIK .gif...
Thank you so match for answer!)

User avatar
aep
Posts: 6
Joined: Wed Mar 13, 2019 11:41 am

Re: Gif image animation in UI Fusion

#6

Post by aep » Sun Dec 08, 2019 2:50 pm

Is it possible to play video in the UI? (Instead of picture - gif)

User avatar
SecondMan
Site Admin
Posts: 4501
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 28
Location: Vancouver, Canada
Been thanked: 121 times
Contact:

Re: Gif image animation in UI Fusion

#7

Post by SecondMan » Sun Dec 08, 2019 3:14 pm

Out of curiosity - is it something useful you are trying to do, or is this for the sake of bling?

User avatar
aep
Posts: 6
Joined: Wed Mar 13, 2019 11:41 am

Re: Gif image animation in UI Fusion

#8

Post by aep » Sun Dec 08, 2019 4:07 pm

SecondMan wrote:
Sun Dec 08, 2019 3:14 pm
is it something useful you are trying to do, or is this for the sake of bling?
Beautiful button :))

User avatar
SecondMan
Site Admin
Posts: 4501
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 28
Location: Vancouver, Canada
Been thanked: 121 times
Contact:

Re: Gif image animation in UI Fusion

#9

Post by SecondMan » Sun Dec 08, 2019 9:37 pm

I thought as much... :D