But you fixed, by yourself, isn't it? Post the code of the skin you incorporated it to, please.
It is currently April 23rd, 2024, 9:27 pm
Animated GIF issue
-
- Rainmeter Sage
- Posts: 16164
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
-
- Rainmeter Sage
- Posts: 7151
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
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. The first package is the running skin (Top left) The second package is where I incorporated it into an existing skin (balala remembers the skin, I hope) 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.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 7151
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
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
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...
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
When I am home this evening I Will try and let you know.
Thanks in advance for your effort.
Thanks in advance for your effort.
-
- Rainmeter Sage
- Posts: 7151
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Rainmeter Sage
- Posts: 16164
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
Have Yincognito fixed the issue? Just to know if to work or not with it.
-
- Rainmeter Sage
- Posts: 7151
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF 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).
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.
-
- Rainmeter Sage
- Posts: 16164
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
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#p173338Yincognito 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.
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?
-
- Rainmeter Sage
- Posts: 7151
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
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: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?
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="{"homepageparams":true,"slider":true,"selectorButtons":true,"zoomInUrl":"/nederland/neerslag/zoom/3uurs","zoomOutUrl":"/wereldwijd/europa/buienradar","legend":"precipitation","abtesting":{"default":["mobile","tablet","desktop"],"btest":["tabletlandscape","desktop"]},"overlays":[{"name":"MyLocations"}],"preload":"RadarMapRainNL?height=512&width=550&extension=png&renderBackground=True&renderBranding=False&renderText=False&history=0&forecast=12&skip=0","preloadMobile":"RadarMapRainNL?height=512&width=550&extension=png&renderBackground=True&renderBranding=False&renderText=False&history=0&forecast=6&skip=1","buttons":[{"name":"Buienradar","shortname":"Buienradar","preload":"RadarMapRainNL?height=512&width=550&extension=png&renderBackground=True&renderBranding=False&renderText=False&history=0&forecast=12&skip=0","preloadMobile":"RadarMapRainNL?height=512&width=550&extension=png&renderBackground=True&renderBranding=False&renderText=False&history=0&forecast=6&skip=1","settings":{"type":"RadarMapRainNL","zoomInUrl":"/nederland/neerslag/zoom/actueel","zoomOutUrl":"/wereldwijd/europa/buienradar","legend":"precipitation","overlays":[{"name":"MyLocations"}]}},{"name":"Zonkracht","shortname":"Zonkracht","id":"zonkracht","settings":{"type":"WeatherMapUVIndexNL","dateOnly":true,"legend":"uvindex","overlays":[{"name":"MyLocations"}]},"preload":"WeatherMapUVIndexNL?height=988&width=820&extension=png&renderBackground=True&renderBranding=False&renderText=False&history=0&forecast=5&skip=0","preloadMobile":"WeatherMapUVIndexNL?height=988&width=820&extension=png&renderBackground=True&renderBranding=False&renderText=False&history=0&forecast=5&skip=0"},{"name":"Satelliet","shortname":"Satelliet","id":"satelliet","settings":{"type":"SatVisual"},"preload":"SatVisual?height=512&width=550&extension=png,jpg&renderBackground=True&renderBranding=False&renderText=False&history=8&forecast=0&skip=0&subType=nl","preloadMobile":"SatVisual?height=512&width=550&extension=png,jpg&renderBackground=True&renderBranding=False&renderText=False&history=8&forecast=0&skip=0&subType=nl"},{"name":"Temperatuur","shortname":"Temp.","id":"temperatuur","settings":{"type":"WeatherMapTemperatureActualNL","legend":"weathermap-temperature","overlays":[{"name":"MyLocations"}]},"preload":"WeatherMapTemperatureActualNL?height=988&width=820&extension=png&renderBackground=False&renderBranding=False&renderText=False&history=12&forecast=0&skip=0","preloadMobile":"WeatherMapTemperatureActualNL?height=988&width=820&extension=png&renderBackground=False&renderBranding=False&renderText=False&history=12&forecast=0&skip=0"}],"preloadedJson":{"imagetype":"RadarMapRainNL","timeOffset":2,"ext":"png","width":550,"height":512,"timestamp":"2020-06-20T18:35:00","still":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201835","stilltimestamp":"2020-06-20T18:35:00","sprite":"https://image.buienradar.nl/2.0/image/sprite/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&history=0&forecast=12&skip=0&timestamp=202006201835","times":[{"timestamp":"2020-06-20T18:35:00","url":&qquot;https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201835"},{"timestamp":"2020-06-20T18:40:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201840"},{"timestamp":"2020-06-20T18:45:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201845"},{"timestamp":"2020-06-20T18:50:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201850"},{"timestamp":"2020-06-20T18:55:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201855"},{"timestamp":"2020-06-20T19:00:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201900"},{"timestamp":"2020-06-20T19:05:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201905"},{"timestamp":"2020-06-20T19:10:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201910"},{"timestamp":"2020-06-20T19:15:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201915"},{"timestamp":"2020-06-20T19:20:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201920"},{"timestamp":"2020-06-20T19:25:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201925"},{"timestamp":"2020-06-20T19:30:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201930"}]},"preloadedMobileJson":{"imagetype":"RadarMapRainNL","timeOffset":2,"ext":"png","width":550,"height":512,"timestamp":"2020-06-20T18:35:00","still":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201835","stilltimestamp":"2020-06-20T18:35:00","sprite":"https://image.buienradar.nl/2.0/image/sprite/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&history=0&forecast=6&skip=1&timestamp=202006201835","times":[{"timestamp":"2020-06-20T18:35:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201835"},{"timestamp":"2020-06-20T18:45:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201845"},{"timestamp":"2020-06-20T18:55:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201855"},{"timestamp":"2020-06-20T19:05:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201905"},{"timestamp":"2020-06-20T19:15:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201915"},{"timestamp":"2020-06-20T19:25:00","url":"https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201925"}]},"legendList":["precipitation","uvindex","weathermap-temperature"],"initSettings":{"mapStyles":"background-image:url('https://image.buienradar.nl/2.0/image/single/RadarMapRainNL?extension=png&width=550&height=512&renderText=False&renderBranding=False&renderBackground=True&timestamp=202006201835');padding-top:93.0909090909091%;","time":"20:35"}}" data-parameters="{}" >
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).