It is currently March 28th, 2024, 2:56 pm

animated weather image

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: animated weather image

Post by jsmorley »

Worked fine for me, as soon as I did two things:

1) Removed that MeasureName that was conflicting with ImageName

Code: Select all

[MeterSymbol]
Meter=Image
;MeasureName=MeasureSymbol
ImageName="d100.\Frame[measureCalc_d100].png"
X=0
Y=0
DynamicVariables=1
2) Changed the Update in [Rainmeter] to 100, so the animation isn't running at one frame per second. Then I just added an extra zero to the variable UpdateRateSeconds, so everything except the animation still runs at the original rate.

Click to animate:
GIF.gif
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: animated weather image

Post by balala »

jsmorley wrote:Worked fine for me, as soon as I did two things:

1) Removed that MeasureName that was conflicting with ImageName

Code: Select all

[MeterSymbol]
Meter=Image
;MeasureName=MeasureSymbol
ImageName="d100.\Frame[measureCalc_d100].png"
X=0
Y=0
DynamicVariables=1
2) Changed the Update in [Rainmeter] to 100, so the animation isn't running at one frame per second. Then I just added an extra zero to the variable UpdateRateSeconds, so everything except the animation still runs at the original rate.

Click to animate:
GIF.gif
Same for me, too. I didn't change the value Update option, but when I removed the MeasureName option, the skin started to work properly.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

jsmorley wrote:Worked fine for me, as soon as I did two things:

1) Removed that MeasureName that was conflicting with ImageName

Code: Select all

[MeterSymbol]
Meter=Image
;MeasureName=MeasureSymbol
ImageName="d100.\Frame[measureCalc_d100].png"
X=0
Y=0
DynamicVariables=1
2) Changed the Update in [Rainmeter] to 100, so the animation isn't running at one frame per second. Then I just added an extra zero to the variable UpdateRateSeconds, so everything except the animation still runs at the original rate.
Thank you very much!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: animated weather image

Post by jsmorley »

Glad to help.

The next thing you are going to want to address is how you get a different animation based on the weather conditions returned from the site.

Most weather sites will return a "number" that corresponds to an icon. So 32 might be what it uses for "sunny" and 28 might be what it uses for "partly cloudy".

So what you want, in my view, is to rethink your naming convention a bit...

In your @Resources folder in the skin, I would create an Images sub-folder. So \@Resources\Images\

In that I would create 48 sub-folders, named with just the numbers from 0 to 47

\@Resources\Images\0\
\@Resources\Images\1\
...
\@Resources\Images\47\

In each of those, I would put the FrameXX.png files that correspond to the desired animation

\@Resources\Images\0\Frame0.png
\@Resources\Images\0\Frame1.png
...
\@Resources\Images\0\Frame16.png

Then in your meter that does the animation, I would use:

Code: Select all

[MeterSymbol]
Meter=Image
ImageName=#@#Images\[MeasureSymbol]\Frame[measureCalc_d100].png
X=0
Y=0
DynamicVariables=1
So what that will do is have it look in the "folder" associated with the icon number, assuming that [MeasureSymbol] is returning the icon number from 0-47, and then use that folder to get the "frames" for the animation.

The reason you want to use @Resources (create it if it doesn't exist) is because when Rainmeter is loaded or refreshed, it will scan all folders under ..Documents\Rainmeter\Skins\ looking for .ini files. It won't however scan in any @Resources folders, and there is no point in having Rainmeter traverse all those icon / animation folders when it refreshes.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

it's exactly what I wanted
once again, thank you for all the support ! :bow:
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

I come back with a question: when I try to run an animated picture in rainmeter, like the one posted above, for example, it runs in slowmotion. So, I tried to make a skin with animated weather icons and they run in slowmotion .
What's the cause?
I thought the cause would be my old pc (Core2Duo E8400, RAM 8gb ddr3, graphic on board Intel GMA4500 with shared memory up to 1759MB)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: animated weather image

Post by jsmorley »

xenium wrote:I come back with a question: when I try to run an animated picture in rainmeter, like the one posted above, for example, it runs in slowmotion. So, I tried to make a skin with animated weather icons and they run in slowmotion .
What's the cause?
I thought the cause would be my old pc (Core2Duo E8400, RAM 8gb ddr3, graphic on board Intel GMA4500 with shared memory up to 1759MB)
Since you are using a Calc measure with a Counter to drive the animation, that measure will be updated once every skin update, the value of the Update option in the [Rainmeter] section. By default that is 1000, or once a second. You will want to reduce that to get the speed you want, maybe Update=100. Be sure to increase any UpdateDivider or UpdateRate on all other measures that are not involved with the animation, so they don't run 10 times as fast for no good reason.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

jsmorley wrote:Since you are using a Calc measure with a Counter to drive the animation, that measure will be updated once every skin update, the value of the Update option in the [Rainmeter] section. By default that is 1000, or once a second. You will want to reduce that to get the speed you want, maybe Update=100. Be sure to increase any UpdateDivider or UpdateRate on all other measures that are not involved with the animation, so they don't run 10 times as fast for no good reason.
I reduced the Rainmeter update and the problem resolved, but another appeared.
When I add a new measurecalc in code, the animation starts running jerky. If you remove the new measurecal animation runs normally.
What's the problem?
TestWeatherSkin.zip
(1.93 MiB) Downloaded 21 times
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: animated weather image

Post by jsmorley »

xenium wrote:I reduced the Rainmeter update and the problem resolved, but another appeared.
When I add a new measurecalc in code, the animation starts running jerky. If you remove the new measurecal animation runs normally.
What's the problem?
TestWeatherSkin.zip
Well there are no images in d100, so Rainmeter is working pretty hard just hammering the log with errors about missing images every 60 milliseconds.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

jsmorley wrote:Well there are no images in d100, so Rainmeter is working pretty hard just hammering the log with errors about missing images every 60 milliseconds.
even if there is a picture in d100, so it happens.
Post Reply