It is currently March 28th, 2024, 10:33 pm

Animated GIF issue

Get help with creating, editing & fixing problems with skins
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

After some modification to the skin I now have 21 updates.
Fingers crossed

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureImage]
Measure=Plugin
Plugin=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
FinishAction=[!DisableMeasure MeasureAnimLoop][!CommandMeasure MeasureExtract "Run" ][!log "Download"]

[MeasureExtract]
Measure=Plugin
Plugin=RunCommand
Parameter=gif2frames.exe current.gif
StartInFolder=#CURRENTPATH#DownloadFile
FinishAction=[!EnableMeasure MeasureAnimLoop]
Disabled=1

[MeasureAnimLoop]
Measure=Calc
Formula=(MeasureAnimLoop % 9) + 1
RegExpSubstitute=1
Substitute="^(\d\d\d\d)$":"0\1","^(\d\d\d)$":"00\1","^(\d\d)$":"000\1","^(\d)$":"0000\1"
OnChangeAction=[!SetOption MeterAnimLoop ImageName current[*MeasureAnimLoop*].png]
Disabled=1

[MeterAnimLoop]
Meter=Image
ImagePath=#CURRENTPATH#DownloadFile
DynamicVariables=1
x=0
Y=0
W=534
H=534
PreserveAspectRatio=1
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animated GIF issue

Post by balala »

JamX wrote: June 19th, 2020, 2:23 pm After some modification to the skin I now have 21 updates.
And still running normally, or the image disappeared after 21 updates?
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

Animation is still running
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animated GIF issue

Post by balala »

JamX wrote: June 19th, 2020, 4:19 pm Animation is still running
:thumbup:
Alright, in this case it seems you succeeded fixing the issue. so, the solution was to disable the [MeasureAnimLoop] measure while the [MeasureExtract] measure is executed, so, since the WebParser measure downloads the animated gif, until gif2frames.exe extracts the frames contained into the downloaded animated gif.
Good job, glad if you got it working finally.
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

balala wrote: June 19th, 2020, 5:09 pm :thumbup:
Alright, in this case it seems you succeeded fixing the issue. so, the solution was to disable the [MeasureAnimLoop] measure while the [MeasureExtract] measure is executed, so, since the WebParser measure downloads the animated gif, until gif2frames.exe extracts the frames contained into the downloaded animated gif.
Good job, glad if you got it working finally.
Yes, the [!DisableMeasure] bang did the trick,.... till now.
I'll monitor it how long it keep running and let you know.

Still it's strange only I have this issue and had to rewrite the code so it keeps working.
I'm not running it on a 'slow' system. Core-7 7th gen, 16 MB Ram, SSD, 250MBit download for network.
Besides that, I had it on two systems. :confused:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animated GIF issue

Post by balala »

JamX wrote: June 19th, 2020, 5:26 pm Besides that, I had it on two systems. :confused:
And have you encountered the same issue on both?
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

balala wrote: June 19th, 2020, 5:34 pm And have you encountered the same issue on both?
yes, on both. that's the strange thing I also can not explain
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote: June 19th, 2020, 5:26 pm Yes, the [!DisableMeasure] bang did the trick,.... till now.
I'll monitor it how long it keep running and let you know.

Still it's strange only I have this issue and had to rewrite the code so it keeps working.
I'm not running it on a 'slow' system. Core-7 7th gen, 16 MB Ram, SSD, 250MBit download for network.
Besides that, I had it on two systems. :confused:
So, apparently I was close in identifying the problem, when I wrote that:
Yincognito wrote: June 18th, 2020, 7:21 pmOther than that, what I think it happens, given the fact that the entire image dissapears, is either:
- the operations somehow overlap each other at some random intervals
Yincognito wrote: June 18th, 2020, 9:46 pm Regarding the "on demand" thing, a small note: since the measure once enabled stays enabled, it's not exactly what I would call "on demand" (it's only "on demand" at the start). Anyway, that was just to make the workflow clearer and try to make each step of the process happen only after the previous one finished.
I was just preparing to stay true to my promise of further helping you of yesterday, but for now it seems it's no longer necessary, right? Anyway, let us know if you still have issues with this. Hopefully you took care of the underlying cause of this. ;-)

One note, for the future, after experiencing this: you have to be careful with the operations that you don't know how long they will last (e.g. a WebParser operation, a RunCommand one, etc.) because sometimes when you want things done a certain way, having the previous operation finish before the next one starts and avoid overlapping stuff is key. Generally, you can count on Rainmeter's own workflow to handle that, but obviously once in a while some failsafe measures from the skin designer are welcomed.

Regarding why it happened on X or Y systems and not on others, it's not necessarily about the computers being slow or not - it's about the fact that some operations happen "in the background" and don't precisely follow a sequential pattern. Coupled with the different characteristics of each system (some visible, some not) can lead to different results.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animated GIF issue

Post by balala »

JamX wrote: June 19th, 2020, 6:15 pm yes, on both. that's the strange thing I also can not explain
:confused: No explanation from my part. :confused:
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

Yincognito wrote: June 19th, 2020, 6:17 pm So, apparently I was close in identifying the problem, when I wrote that:

I was just preparing to stay true to my promise of further helping you of yesterday, but for now it seems it's no longer necessary, right? Anyway, let us know if you still have issues with this. Hopefully you took care of the underlying cause of this. ;-)
I would appriciate it if you still give it a go?

When the skin is running on its own all is fine till now.

When I incorperate it into an existing skin the animation stops, again.
Maybe your coding fixes this.