It is currently March 29th, 2024, 11:35 am

[SOLVED] Bitmap frame times

Get help with creating, editing & fixing problems with skins
Darth Weber
Posts: 6
Joined: October 5th, 2017, 6:28 am

[SOLVED] Bitmap frame times

Post by Darth Weber »

Dear girls and guys,

i am using a multiframe bitmap to display an animation - with the update rate of 50 this Animation is smooth - but it would be great to diplay only the LAST frame longer time. Is there any chance to realize that ?

Code: Select all

[Rainmeter]
Update=50

[MeasureAnimation]
Measure=CALC
Formula=Counter % 20

...

[MeterAnimation]
Meter=BITMAP
MeasureName=MeasureAnimation
BitmapImage=\\chekow\c\IP-Symcon\media\Flugwetter\Radar_D_Nord_MF.png
BitmapFrames=20
BitmapExtend=1
Y=0R
w=500
h=100
EDIT: Just got the idea to copy the last frame 10 times which leads to a good solution !!!
Last edited by fonpaolo on October 7th, 2017, 4:39 pm, edited 1 time in total.
Reason: Please use the [Code] tags to display your code, not [Snippet]
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [SOLVED] Bitmap frame times

Post by balala »

Darth Weber wrote:EDIT: Just got the idea to copy the last frame 10 times which leads to a good solution !!!
But there also is another, much simpler (in my opinion) solution: instead of copying the last frame, I'd extend the limits of the division used in the Formula option of the [MeasureAnimation] measure and would use a Clamp function, to narrow back down its limits. If you're interesetd, just try to replace the Formula option of the measure with the following one: Formula=( Clamp (( Counter % 30 ), 0, 19 )). With this function the values returned by the ( Counter % 30 ) are between 0 and 29. But because you don't need all these values, the Clamp function doesn't let the returned values to go outside of the set up limits (0 and 19 in this case). Due to this function, the values will go from 0 to 19, then while the values of the ( Counter % 30 ) operation goes up to 29, the value of the Clamp function will remain on 19. Changing the value 30 from the previous operation, you can set how long the last frame will be shown.