It is currently August 8th, 2020, 9:15 am

Animated GIF issue

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Posts: 2195
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote:
June 29th, 2020, 9:07 pm
I'll give it a try tomorrow.

Thanks for the hint. :thumbup:
Yeah, no need to. The code (it proved trickier than expected, but didn't create any problems, ran smoothly from the start):

Code: Select all

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

[Variables]
BackgroundColor=0,0,0,50
BackgroundColor2=0,0,0,160

FrameWidth=232
FrameHeight=232

RainHistoryFrames=3
RainForecastFrames=12
LightningHistoryFrames=3
LightningForecastFrames=0

FrameOffset=0
FrameCount=0
FileName=

UpdateInterval=1000
UpdateWebParser=60
Delay=0

---Measures WebParser---

[MeasureRainImage]
Measure=WebParser
URL=https://image.buienradar.nl/2.0/image/sprite/RadarMapRainNL?extension=png&width=#FrameWidth#&height=#FrameHeight#&renderText=True&renderBranding=False&renderBackground=True&history=#RainHistoryFrames#&forecast=#RainForecastFrames#&skip=0
Download=1
DownloadFile=Rain.png
ForceReload=1
UpdateRate=1
UpdateDivider=(#UpdateWebParser#*1000/#UpdateInterval#)
FinishAction=[!Log "Rain Image Download Finished"][!Delay #Delay#][!PauseMeasure "MeasureAnimLoop"][!EnableMeasure "MeasureLightningImage"][!CommandMeasure MeasureLightningImage "Update"]
OnConnectErrorAction=[!Log "Rain Image Connection Error"][!Delay #Delay#][!PauseMeasure "MeasureAnimLoop"][!EnableMeasure "MeasureLightningImage"][!CommandMeasure MeasureLightningImage "Update"]
OnDownloadErrorAction=[!Log "Rain Image Download Error"][!Delay #Delay#][!PauseMeasure "MeasureAnimLoop"][!EnableMeasure "MeasureLightningImage"][!CommandMeasure MeasureLightningImage "Update"]
DynamicVariables=1

[MeasureLightningImage]
Disabled=1
Measure=WebParser
URL=https://image.buienradar.nl/2.0/image/sprite/RadarMapLightningNL?extension=png&width=#FrameWidth#&height=#FrameHeight#&renderText=True&renderBranding=False&renderBackground=True&history=#LightningHistoryFrames#&forecast=#LightningForecastFrames#&skip=0
Download=1
DownloadFile=Lightning.png
ForceReload=1
UpdateRate=-1
UpdateDivider=(#UpdateWebParser#*1000/#UpdateInterval#)
FinishAction=[!Log "Lightning Image Download Finished"][!Delay #Delay#][!UnpauseMeasureGroup "LoopGroup"]
OnConnectErrorAction=[!Log "Lightning Image Connection Error"][!Delay #Delay#][!UnpauseMeasureGroup "LoopGroup"]
OnDownloadErrorAction=[!Log "Lightning Image Download Error"][!Delay #Delay#][!UnpauseMeasureGroup "LoopGroup"]
DynamicVariables=1

---Measures Rainmeter---

[MeasureCounter]
Group=LoopGroup
Paused=1
Measure=Calc
Formula=((MeasureCounter%(#LightningHistoryFrames#+#LightningForecastFrames#+#RainHistoryFrames#+#RainForecastFrames#))+1)
IfCondition=(MeasureCounter>(0)) && (MeasureCounter<=(#LightningHistoryFrames#+#LightningForecastFrames#))
IfTrueAction=[!SetVariable FrameOffset 0][!SetVariable FrameCount (#LightningHistoryFrames#+#LightningForecastFrames#)][!SetVariable FileName "Lightning.png"]
IfCondition2=(MeasureCounter>(#LightningHistoryFrames#+#LightningForecastFrames#)) && (MeasureCounter<=(#LightningHistoryFrames#+#LightningForecastFrames#+#RainHistoryFrames#+#RainForecastFrames#))
IfTrueAction2=[!SetVariable FrameOffset (#LightningHistoryFrames#+#LightningForecastFrames#)][!SetVariable FrameCount (#RainHistoryFrames#+#RainForecastFrames#)][!SetVariable FileName "Rain.png"]
IfConditionMode=1
DynamicVariables=1

[MeasureAnimLoop]
Group=LoopGroup
Paused=1
Measure=Calc
Formula=(MeasureCounter-#FrameOffset#)
MinValue=(0)
MaxValue=(#FrameCount#)
DynamicVariables=1

---Meters---

[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,236,236,5 | Fill Color #Backgroundcolor2# | StrokeWidth 1.5 | Stroke Color #Backgroundcolor#
;X=315
;Y=596

[MeterAnimLoop]
Meter=Bitmap
BitmapImage=#CURRENTPATH#DownloadFile\#FileName#
MeasureName=MeasureAnimLoop
BitmapFrames=(#FrameCount#)
BitmapZeroFrame=1
;SolidColor=0,0,0,160
ImageTint=255,255,255,155
X=2r
Y=2r
W=232
H=232
DynamicVariables=1
The results after 10 updates once every minute (set it back to what you want it to be, as explained earlier):
RadarPlus - Sprites.jpg
If you don't know or can't figure out what happens in the skin, just ask. If this doesn't work either on your system, I don't know what to say, really - you can't have it simpler than that.
You do not have the required permissions to view the files attached to this post.
User avatar
JamX
Posts: 173
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

Wow, Thanks for this quick reply.

I'm testing it as we speak.

I changed RainHistoryFrames=3 to RainHistoryFrames=0 so the LightningHistoryFrames=3 fill up that gap and you do not display twice the same time frames.

Let you know if it's stable. till now its running OK.
User avatar
Yincognito
Posts: 2195
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote:
June 30th, 2020, 8:27 am
Wow, Thanks for this quick reply.

I'm testing it as we speak.

I changed RainHistoryFrames=3 to RainHistoryFrames=0 so the LightningHistoryFrames=3 fill up that gap and you do not display twice the same time frames.

Let you know if it's stable. till now its running OK.
Yeah, forgot to mention that you'll have to set those parameters properly, as you want them. I did noticed the times were repeating, but that had nothing to do with making the skin work so I didn't bothered, that's your job. :D Maybe adding some appropriate timestamp parameters in either one or both URLs would make that right? :confused: EDIT: Just re-read your reply and apparently you solved that thing already.

P.S. Regarding the quick reply, 99.99% of the code was already done since last night, but got a power cut and decided to post it today insead.
User avatar
Yincognito
Posts: 2195
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote:
June 30th, 2020, 8:27 am
Wow, Thanks for this quick reply.

I'm testing it as we speak.

I changed RainHistoryFrames=3 to RainHistoryFrames=0 so the LightningHistoryFrames=3 fill up that gap and you do not display twice the same time frames.

Let you know if it's stable. till now its running OK.
I have a mistake in the code, I just noticed it: forgot to set [!PauseMeasureGroup "LoopGroup"] instead of the "old" [!PauseMeasure "MeasureAnimLoop"] in all 3 action options from [MeasureRainImage]. You can do that in a heartbeat.
User avatar
JamX
Posts: 173
Joined: October 4th, 2019, 2:46 pm

Re: Animated GIF issue

Post by JamX »

Yincognito wrote:
June 30th, 2020, 9:25 am
I have a mistake in the code, I just noticed it: forgot to set [!PauseMeasureGroup "LoopGroup"] instead of the "old" [!PauseMeasure "MeasureAnimLoop"] in all 3 action options from [MeasureRainImage]. You can do that in a heartbeat.
Done!

Thanks for this option.
Seems to be working like a charm. :thumbup:

Now I can intergrade it again inside the weather_TWC skin with the sliding windows :great:
User avatar
Yincognito
Posts: 2195
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animated GIF issue

Post by Yincognito »

JamX wrote:
June 30th, 2020, 10:18 am
Done!

Thanks for this option.
Seems to be working like a charm. :thumbup:

Now I can intergrade it again inside the weather_TWC skin with the sliding windows :great:
No problem - good luck with the integration and enjoy, if all works out well. ;-)