It is currently May 6th, 2024, 12:29 am

[BUG] PreserveAspectRatio

Get help with creating, editing & fixing problems with skins
Spiny
Posts: 2
Joined: August 15th, 2009, 1:58 pm

[BUG] PreserveAspectRatio

Post by Spiny »

Hi

I think I've found a bug with PreserveAspectRatio:

When you use it by specifying an image file it's fine, but it doesn't seem to work in conjunction with the web parser plugin.

e.g.: Grabbing the Google logo & resizing just one dimension doesn't preserve the aspect ratio.

Code: Select all

[MeasureImage]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=https://encrypted.google.com/images/logos/ssl_logo.png
StringIndex=1
Download=1

[MeterImage]
MeasureName=MeasureImage
Meter=IMAGE
W=800
PreserveAspectRatio=1
Adding in ImageName=[MeasureImage] in an attempt to pick up the image file from the cache doesn't seem to help.

Rainmeter 2.1.0 r959 x64
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] PreserveAspectRatio

Post by jsmorley »

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureImage]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=https://encrypted.google.com/images/logos/ssl_logo.png
StringIndex=1
Download=1

[MeterImage]
Meter=IMAGE
MeasureName=MeasureImage
W=800
PreserveAspectRatio=1

-You need DynamicWindowSize, so the container for the image will grow as you scale up the image. The scaling with W and PreserveAspectRatio is done after the image is initially loaded and the size of the container for the graphic is set.
-There is no StringIndex, as you have not "captured" any strings...
Spiny
Posts: 2
Joined: August 15th, 2009, 1:58 pm

Re: [BUG] PreserveAspectRatio

Post by Spiny »

Brill, thanks