It is currently August 5th, 2020, 1:49 pm

Animated GIF issue

Help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 11156
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animated GIF issue

Post by balala »

JamX wrote:
June 19th, 2020, 7:59 pm
When I incorperate it into an existing skin the animation stops, again.
But you fixed, by yourself, isn't it? Post the code of the skin you incorporated it to, please.
User avatar
Yincognito
Posts: 2144
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote:
June 19th, 2020, 7:59 pm
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.
Ok, I'll give it a go. ;-)
User avatar
JamX
Posts: 173
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

balala wrote:
June 19th, 2020, 8:05 pm
But you fixed, by yourself, isn't it? Post the code of the skin you incorporated it to, please.
In the video you'll see in the top right corner the skin which works for long time.
At the left side bottom you'll see the skin where I have incorporated the code from the top right skin in the video.
example.mp4
The first package is the running skin (Top left)
Radar 2times 1_2_.rmskin
The second package is where I incorporated it into an existing skin (balala remembers the skin, I hope)
Radar 2times 2_2_.rmskin
I added a 3rd sliding window to popup when hovering the mouse over the first weathericon
In that container [MeterContainer3] (row369) I added the [MeterAnimLoop]

The measures are at row 222 till 245

After 2 times refresh you'll see the image appear again till the time comes that it disappears, again.
working after 2xrefresh.mp4
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Posts: 2144
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote:
June 19th, 2020, 7:59 pm
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.
Here it is - let me know if you still have issues using this code. I guess all the logging and the delays are junk and can eventually be removed, if it all works without them:

Code: Select all

[Variables]
UpdateInterval=1000
UpdateWebParser=300
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"][!DisableMeasure "MeasureAnimLoop"][!UpdateMeasure "MeasureAnimLoop"]
FinishAction=[!Log "Download Finished"][!Delay #Delay#][!Log "Extracting Started"][!CommandMeasure MeasureExtract "Run"]
OnConnectErrorAction=[!Log "Connection Error"][!Delay #Delay#][!Log "Extracting Started"][!CommandMeasure MeasureExtract "Run"]
OnDownloadErrorAction=[!Log "Download Error"][!Delay #Delay#][!Log "Extracting 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 "Extracting Finished (Error Code: [MeasureExtract:])"][!Delay #Delay#][!EnableMeasure MeasureAnimLoop]
DynamicVariables=1

---Measures Rainmeter---

[MeasureAnimLoop]
Disabled=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
Stuff is disabled when WebParser starts the parsing, and enabled back after the extraction is finished. I used an update rate of 1 and an update divider instead in the WebParser in order to be able to do things in the OnUpdateAction (because for some reason, UpdateRate doesn't trigger it, only the regular update process, e.g. the Update or UpdateDivider related one).

I started from the original code you posted and didn't look at the other attempts, as I was only interested in making the whole thing as clear and non-overlapping as possible. Some possibly odd thing happens in the RunCommand measure though, where the error code isn't necessarily the "normal" / "safe" 1, which means its operation didn't yet finished completely at the time of logging, but as long as things don't produce undesired behavior I guess we can (hopefully) live with it, in the interest of an uncrippled fluency in the skin operations.

I set the update of the WebParser at 5 minutes (the formula there makes sure one can lower the general update of the skin with the WebParser update staying constant at the value set in the UpdateWebParser variable), and the skin is running for 40 minutes now (thus, 8 WebParser / RunCommand updates) without any issues. Hopefully it will behave the same in your case as well.

EDIT: You will experience "non-image" moments when the update happens, but things will resume to normal once the extraction is finished. I guess this can be workarounded in various ways, like temporarily setting a "default" "updating in progress" image at the time of update, so that you won't have an "empty" rectangle there, or even creating a copy of the previously extracted images and iterating through them until the new extraction is done, but at least the "blank moment" isn't permanent like you experienced before. So, in the end, the original issue was probably the fact that the extraction process conflicted somehow with Rainmeter storing the cached version of the previously extracted images and the rectangle got blank as a result - that being said, I have no idea why things didn't resume to the normal workflow after that and no error was thrown in the log...
User avatar
JamX
Posts: 173
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

When I am home this evening I Will try and let you know.

Thanks in advance for your effort.
User avatar
Yincognito
Posts: 2144
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote:
June 20th, 2020, 4:04 pm
When I am home this evening I Will try and let you know.

Thanks in advance for your effort.
No problem. ;-)
User avatar
balala
Rainmeter Sage
Posts: 11156
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animated GIF issue

Post by balala »

JamX wrote:
June 20th, 2020, 4:04 pm
When I am home this evening I Will try and let you know.
Have Yincognito fixed the issue? Just to know if to work or not with it.
User avatar
Yincognito
Posts: 2144
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

balala wrote:
June 20th, 2020, 5:46 pm
Have Yincognito fixed the issue?
Assuming it works for him, that depends on whether is acceptable to have the image placeholder blank while the update happens. If not, I can find a solution to it (probably iterate through a copy of "backup images" and switching over to the newly extracted once the extraction is done).
balala wrote:
June 20th, 2020, 5:46 pm
Just to know if to work or not with it.
Just to let you know, I probably won't deal with the integration into another skin, as mentioned here. Since apparently you know what skin he's talking about (as per his words), you'll probably be more suited to tackle that than me. If you want to, of course.
User avatar
balala
Rainmeter Sage
Posts: 11156
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animated GIF issue

Post by balala »

Yincognito wrote:
June 20th, 2020, 6:16 pm
Just to let you know, I probably won't deal with the integration into another skin, as mentioned here. Since apparently you know what skin he's talking about (as per his words), you'll probably be more suited to tackle that than me. If you want to, of course.
I obviously want. And yep, I know for sure, but the problem is the code has to be rewritten and I suppose he has rewrote it (not sure though). The old code doesn't work anymore, as all weather skins don't work. Probably there have been posted more versions over time, but for instance this is one of them: https://forum.rainmeter.net/viewtopic.php?f=5&t=34856&start=10#p173338
It seems you've worked with it as well. Do you remember?
Anyway I wait you to finish working with it, then we'll see. Until then, JamX, have you rewritten the code?
User avatar
Yincognito
Posts: 2144
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

balala wrote:
June 20th, 2020, 6:39 pm
I obviously want. And yep, I know for sure, but the problem is the code has to be rewritten and I suppose he has rewrote it (not sure though). The old code doesn't work anymore, as all weather skins don't work. Probably there have been posted more versions over time, but for instance this is one of them: https://forum.rainmeter.net/viewtopic.php?f=5&t=34856&start=10#p173338
It seems you've worked with it as well. Do you remember?
Anyway I wait you to finish working with it, then we'll see. Until then, JamX, have you rewritten the code?
I see. Right now I discovered that on the site he's getting the GIF from there are also the individual frames of the GIF itself. For example, looking at the page source of the site, there are things like:

Code: Select all

<div id="7aa37c57-b57f-44d8-83bd-b862d234b936" class="map-wrap buienradar-control RadarMapRainNL" data-control="Map" data-group="buienradar.mainmap" data-properties="{&quot;homepageparams&quot;:true,&quot;slider&quot;:true,&quot;selectorButtons&quot;:true,&quot;zoomInUrl&quot;:&quot;/nederland/neerslag/zoom/3uurs&quot;,&quot;zoomOutUrl&quot;:&quot;/wereldwijd/europa/buienradar&quot;,&quot;legend&quot;:&quot;precipitation&quot;,&quot;abtesting&quot;:{&quot;default&quot;:[&quot;mobile&quot;,&quot;tablet&quot;,&quot;desktop&quot;],&quot;btest&quot;:[&quot;tabletlandscape&quot;,&quot;desktop&quot;]},&quot;overlays&quot;:[{&quot;name&quot;:&quot;MyLocations&quot;}],&quot;preload&quot;:&quot;RadarMapRainNL?height=512&amp;width=550&amp;extension=png&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=0&amp;forecast=12&amp;skip=0&quot;,&quot;preloadMobile&quot;:&quot;RadarMapRainNL?height=512&amp;width=550&amp;extension=png&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=0&amp;forecast=6&amp;skip=1&quot;,&quot;buttons&quot;:[{&quot;name&quot;:&quot;Buienradar&quot;,&quot;shortname&quot;:&quot;Buienradar&quot;,&quot;preload&quot;:&quot;RadarMapRainNL?height=512&amp;width=550&amp;extension=png&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=0&amp;forecast=12&amp;skip=0&quot;,&quot;preloadMobile&quot;:&quot;RadarMapRainNL?height=512&amp;width=550&amp;extension=png&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=0&amp;forecast=6&amp;skip=1&quot;,&quot;settings&quot;:{&quot;type&quot;:&quot;RadarMapRainNL&quot;,&quot;zoomInUrl&quot;:&quot;/nederland/neerslag/zoom/actueel&quot;,&quot;zoomOutUrl&quot;:&quot;/wereldwijd/europa/buienradar&quot;,&quot;legend&quot;:&quot;precipitation&quot;,&quot;overlays&quot;:[{&quot;name&quot;:&quot;MyLocations&quot;}]}},{&quot;name&quot;:&quot;Zonkracht&quot;,&quot;shortname&quot;:&quot;Zonkracht&quot;,&quot;id&quot;:&quot;zonkracht&quot;,&quot;settings&quot;:{&quot;type&quot;:&quot;WeatherMapUVIndexNL&quot;,&quot;dateOnly&quot;:true,&quot;legend&quot;:&quot;uvindex&quot;,&quot;overlays&quot;:[{&quot;name&quot;:&quot;MyLocations&quot;}]},&quot;preload&quot;:&quot;WeatherMapUVIndexNL?height=988&amp;width=820&amp;extension=png&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=0&amp;forecast=5&amp;skip=0&quot;,&quot;preloadMobile&quot;:&quot;WeatherMapUVIndexNL?height=988&amp;width=820&amp;extension=png&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=0&amp;forecast=5&amp;skip=0&quot;},{&quot;name&quot;:&quot;Satelliet&quot;,&quot;shortname&quot;:&quot;Satelliet&quot;,&quot;id&quot;:&quot;satelliet&quot;,&quot;settings&quot;:{&quot;type&quot;:&quot;SatVisual&quot;},&quot;preload&quot;:&quot;SatVisual?height=512&amp;width=550&amp;extension=png,jpg&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=8&amp;forecast=0&amp;skip=0&amp;subType=nl&quot;,&quot;preloadMobile&quot;:&quot;SatVisual?height=512&amp;width=550&amp;extension=png,jpg&amp;renderBackground=True&amp;renderBranding=False&amp;renderText=False&amp;history=8&amp;forecast=0&amp;skip=0&amp;subType=nl&quot;},{&quot;name&quot;:&quot;Temperatuur&quot;,&quot;shortname&quot;:&quot;Temp.&quot;,&quot;id&quot;:&quot;temperatuur&quot;,&quot;settings&quot;:{&quot;type&quot;:&quot;WeatherMapTemperatureActualNL&quot;,&quot;legend&quot;:&quot;weathermap-temperature&quot;,&quot;overlays&quot;:[{&quot;name&quot;:&quot;MyLocations&quot;}]},&quot;preload&quot;:&quot;WeatherMapTemperatureActualNL?height=988&amp;width=820&amp;extension=png&amp;renderBackground=False&amp;renderBranding=False&amp;renderText=False&amp;history=12&amp;forecast=0&amp;skip=0&quot;,&quot;preloadMobile&quot;:&quot;WeatherMapTemperatureActualNL?height=988&amp;width=820&amp;extension=png&amp;renderBackground=False&amp;renderBranding=False&amp;renderText=False&amp;history=12&amp;forecast=0&amp;skip=0&quot;}],&quot;preloadedJson&quot;:{&quot;imagetype&quot;:&quot;RadarMapRainNL&quot;,&quot;timeOffset&quot;:2,&quot;ext&quot;:&quot;png&quot;,&quot;width&quot;:550,&quot;height&quot;:512,&quot;timestamp&quot;:&quot;2020-06-20T18:35:00&quot;,&quot;still&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201835&quot;,&quot;stilltimestamp&quot;:&quot;2020-06-20T18:35:00&quot;,&quot;sprite&quot;:&quot;https://image.buienradar.nl/2.0/image/sprite/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;history=0&amp;forecast=12&amp;skip=0&amp;timestamp=202006201835&quot;,&quot;times&quot;:[{&quot;timestamp&quot;:&quot;2020-06-20T18:35:00&quot;,&quot;url&quot;:&qquot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201835&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T18:40:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201840&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T18:45:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201845&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T18:50:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201850&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T18:55:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201855&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:00:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201900&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:05:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201905&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:10:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201910&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:15:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201915&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:20:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201920&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:25:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201925&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:30:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201930&quot;}]},&quot;preloadedMobileJson&quot;:{&quot;imagetype&quot;:&quot;RadarMapRainNL&quot;,&quot;timeOffset&quot;:2,&quot;ext&quot;:&quot;png&quot;,&quot;width&quot;:550,&quot;height&quot;:512,&quot;timestamp&quot;:&quot;2020-06-20T18:35:00&quot;,&quot;still&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201835&quot;,&quot;stilltimestamp&quot;:&quot;2020-06-20T18:35:00&quot;,&quot;sprite&quot;:&quot;https://image.buienradar.nl/2.0/image/sprite/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;history=0&amp;forecast=6&amp;skip=1&amp;timestamp=202006201835&quot;,&quot;times&quot;:[{&quot;timestamp&quot;:&quot;2020-06-20T18:35:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201835&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T18:45:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201845&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T18:55:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201855&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:05:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201905&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:15:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201915&quot;},{&quot;timestamp&quot;:&quot;2020-06-20T19:25:00&quot;,&quot;url&quot;:&quot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201925&quot;}]},&quot;legendList&quot;:[&quot;precipitation&quot;,&quot;uvindex&quot;,&quot;weathermap-temperature&quot;],&quot;initSettings&quot;:{&quot;mapStyles&quot;:&quot;background-image:url(&#x27;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&amp;width=550&amp;height=512&amp;renderText=False&amp;renderBranding=False&amp;renderBackground=True&amp;timestamp=202006201835&#x27;);padding-top:93.0909090909091%;&quot;,&quot;time&quot;:&quot;20:35&quot;}}" data-parameters="{}" >
with all kinds of individual images like this one, for example:
Image
I'm thinking that extracting those individual images with WebParser and showing them one by one could also be a solution to this.

Anyway, for now I'll try to either minimize or eliminate the "blank period" in my solution by either disabling only when the extraction starts (right now I disable it when the download starts, so the blank period is longer), or by pausing the measure instead of disabling it (which should make things more bearable visually).