Right, especially that such a step should avoid using the gif2frames.exe app and this could probably eliminate the hiding of the animation. I suppose...Yincognito wrote: ↑June 20th, 2020, 7:03 pm I'm thinking that extracting those individual images with WebParser and showing them one by one could also be a solution to this.
It is currently April 25th, 2024, 12:06 pm
Animated GIF issue
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
-
- Rainmeter Sage
- Posts: 7160
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
Yeah, that was my reasoning as well. Not sure if it will be faster or slower though...
Anyway, I think the pause/unpause version below, if it doesn't produce negative effects for JamX, is probably the best one can do in this GIF scenario. It doesn't disable anything, and, aside from the normal "blank period" on refresh (i.e. until the GIF is first downloaded and its frames extracted), it works smoothly. Naturally, between the current PNG file on display and the newly downloaded / extracted one following it there will be differences and some very short period of animation "freeze" / "pause", but that's normal and as long as the image doesn't dissapear from the screen I think it's a reasonable compromise, given the fact that the animation freeze / pause is basically impossible to notice anyway, not to mention it lasts only around half a second on my system.
Here it is:
Code: Select all
[Variables]
UpdateInterval=1000
UpdateWebParser=600
Delay=0
[Rainmeter]
Update=#UpdateInterval#
DynamicWindowSize=1
AccurateText=1
---Measures WebParser---
[MeasureImage]
Measure=WebParser
URL="https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=500&width=500&extension=gif&renderBackground=True&renderBranding=False&renderText=True&history=3&forecast=6&skip=1"
Download=1
DownloadFile="current.gif"
ForceReload=1
UpdateRate=1
UpdateDivider=(#UpdateWebParser#*1000/#UpdateInterval#)
OnUpdateAction=[!Log "Download Started"]
FinishAction=[!Log "Download Finished"][!Delay #Delay#][!PauseMeasure "MeasureAnimLoop"][!Log "Extraction Started"][!CommandMeasure MeasureExtract "Run"]
OnConnectErrorAction=[!Log "Connection Error"][!Delay #Delay#][!PauseMeasure "MeasureAnimLoop"][!Log "Extraction Started"][!CommandMeasure MeasureExtract "Run"]
OnDownloadErrorAction=[!Log "Download Error"][!Delay #Delay#][!PauseMeasure "MeasureAnimLoop"][!Log "Extraction Started"][!CommandMeasure MeasureExtract "Run"]
DynamicVariables=1
---Measures RunCommand---
[MeasureExtract]
Measure=Plugin
Plugin=RunCommand
Parameter="gif2frames.exe current.gif"
StartInFolder="#CURRENTPATH#DownloadFile"
State=Hide
OutputType=ANSI
Timeout=5000
FinishAction=[!Log "Extraction Finished (Error Code: [MeasureExtract:])"][!Delay #Delay#][!UnpauseMeasure MeasureAnimLoop]
DynamicVariables=1
---Measures Rainmeter---
[MeasureAnimLoop]
Paused=1
Measure=Calc
Formula=((MeasureAnimLoop%9)+1)
OnUpdateAction=[!Log "Displaying Frame [MeasureAnimLoop]"]
RegExpSubstitute=1
Substitute="^(.*)$":"0000\1","^.*(.{5})$":"\1"
DynamicVariables=1
---Meters---
[MeterAnimLoop]
Meter=Image
ImagePath="#CURRENTPATH#DownloadFile"
ImageName="current[MeasureAnimLoop].png"
PreserveAspectRatio=1
SolidColor=0,0,0,64
X=0
Y=0
W=534
H=534
DynamicVariables=1
- the general update interval (i.e. the UpdateInterval variable, in milliseconds)
- the WebParser measure update interval (i.e. the UpdateWebParser variable, in seconds - this stays at the set value, due to the WebParser's UpdateDivider formula)
- the delay period (i.e. the Delay variable, in milliseconds)
I tested this by setting UpdateWebParser=60 (i.e. once a minute) in order to speed up the result analysis, and it worked fine for more than 10 download & extract "sessions". Hopefully it'll be the same for JamX.
P.S. As previously mentioned, the logging and the delays could be removed eventually and if stuff works without them, then all good. My impression is that the delays don't serve that much of a purpose in this case, but hey, I could be wrong.
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
3 skins are running.
The original one I adjusted yesterday (which is still running. (Middel animation)
The skin where I have tried to incorporate the original code into (Left animation)
The code from Yincognito (Right side)
Here is the update of the 3 skins
As can be seen the middel and right one are displayed after the update but the left one fails.
The original one I adjusted yesterday (which is still running. (Middel animation)
The skin where I have tried to incorporate the original code into (Left animation)
The code from Yincognito (Right side)
Here is the update of the 3 skins
As can be seen the middel and right one are displayed after the update but the left one fails.
You do not have the required permissions to view the files attached to this post.
Last edited by JamX on June 20th, 2020, 8:23 pm, edited 1 time in total.
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
So, are they ok now? Is there anything else to help you with?
-
- Rainmeter Sage
- Posts: 7160
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
Nice! I assume you used my last posted code (the one using pause/unpause), right?
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
Here is the update of the 3 skins
As can be seen the middel and right one are displayed after the update but the left one fails.You do not have the required permissions to view the files attached to this post.
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
Yes, but not in the left skin.Yincognito wrote: ↑June 20th, 2020, 8:14 pm Nice! I assume you used my last posted code (the one using pause/unpause), right?
I'll incorporate it into the left skin and see what happens
-
- Rainmeter Sage
- Posts: 7160
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
After the update or after the refresh? Because my last posted code using pause/unpause should not have "blank moments", at least it never happened on my system. Or maybe it's because of the resizing of the image from 500x500 to whatever dimensions you have it set there (as they look smaller)?
EDIT: Just tried setting the image to be smaller, at 200x200, and, as expected and as before, I don't even notice when the update happens, so it's not the redimensioning: P.S. Changed the extension of the file to .mp4 as the forum for some reason doesn't accept .avi files.
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on June 20th, 2020, 9:02 pm, edited 1 time in total.
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
First update of the 2 skins.
Top 2 skins are the "Old"skins
Bottom skins are Yincognito code
So far so good.
I'll monitor it for stability over time
Top 2 skins are the "Old"skins
Bottom skins are Yincognito code
So far so good.
I'll monitor it for stability over time
You do not have the required permissions to view the files attached to this post.
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
This morning it looks like this.
Yincognito's code is still running and displaying
The old code is also still running.
The Old code incorporated in the weather skin is showing some weird behavior.
The download and extraction have taken place, the animationloop is running and the skin is showing the fisrt frame of the animation. ( is the first time I notice this behavior. ) After the next update NO frames are shown Strange
You do not have the required permissions to view the files attached to this post.