Formulas do not work in ImageCrop. I am not sure what value it uses instead of the formula, but from my experience it seems to use 0 as the value.
Example of code that works:
ImageCrop=0, 0, 5, 181, 1
Example of code that does not work (uses 0 instead):
ImageCrop=0, 0, 5, (180), 1
ImageCrop=0, 0, 5, (180 + 1), 1
ImageCrop=0, 0, 5, (#Var# + 180), 1
The documentation for formulas says that formulas can be used "as a numeric part of an option value", and this is the example:
FontColor=(255 * 0.5),255,255,255
However, this doesn't seem to work with ImageCrop, and the only way around it is to calculate the result first using a Calc measure or by doing it manually. Any help would be appreciated.
It is currently October 13th, 2024, 6:34 am
Formulas do not work in ImageCrop
-
- Posts: 2
- Joined: May 25th, 2022, 5:05 pm
-
- Rainmeter Sage
- Posts: 16651
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Formulas do not work in ImageCrop
They are, just remove the spaces outside of the formulas, from the options. All of the following ones are working:
ImageCrop=0,0,5,(180),1
ImageCrop=0,0,5,(180+1),1
ImageCrop=0,0,5,(#Var#+180),1
Additionally even the following ones are working:
ImageCrop=0,0,5,(180 + 1),1
ImageCrop=0,0,5,(#Var# + 180),1
If there are no formulas, the spaces can be used. That's why the ImageCrop=0, 0, 5, 181, 1 option is working.
-
- Posts: 2
- Joined: May 25th, 2022, 5:05 pm
Re: Formulas do not work in ImageCrop
Ah I see. Thanks for the solution - I'll test it out right now.
-
- Rainmeter Sage
- Posts: 1398
- Joined: April 24th, 2021, 8:13 pm
-
- Posts: 217
- Joined: May 16th, 2012, 5:38 am
Re: Formulas do not work in ImageCrop
It's at the very least inconsistent behavior.
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...
-
- Developer
- Posts: 2738
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Formulas do not work in ImageCrop
This has been fixed for the next release. Thanks for reporting!
-Brian
-Brian