Here is the Working Code:
Code: Select all
ImageCrop=((#W#+1)*47),0,10,500,5
Code: Select all
ImageCrop=((#W#+1)*47),0,10,500,4
Code: Select all
ImageCrop=((#W#+1)*47),0,10,500,5
Code: Select all
ImageCrop=((#W#+1)*47),0,10,500,4
Your equation is really unnecessary unless it is actually simplifying your code.ImageCrop
Crops out and uses a defined part of the image. The option value should be in the form: X, Y, W, H, Origin.
Origin is optional and can be set to one of the following:
1 : Top left (default)
2 : Top right
3 : Bottom right
4 : Bottom left<------ why can't you utilise this property?
5 : Center
A way to envision what ImageCrop is doing is:
ImageCrop=-50,-30,100,60,5<-------In this format?
Start at the Origin of 5 or "Center". Then move -50 pixels left (negative number is left, positive number is right) and -30 pixels up (negative number is up, positive number is down). Then capture 100 pixels of width, and 60 pixels of height, and that is the new image. This will crop and use 100 X 60 pixels of the center of the image.
Notes:
ImageCrop is done before any resizing of the image with the W and H general meter options. If W and H are set, the new "cropped" image will be resized to fit.
If W and H are not defined, ImageCrop will change the size of the entire meter container to the size of the "cropped" image.
So let's use this image as an example. It's 450 X 605: First, let put a mostly transparent copy of that image up so we can see how the cropped "pieces" look on top of it. I'm using X and Y on the meter(s) to keep the pieces in the same spot they would be in the original image.A way to envision what ImageCrop is doing is:
ImageCrop=-50,-30,100,60,5
Start at the Origin of 5 or "Center". Then move -50 pixels left (negative number is left, positive number is right) and -30 pixels up (negative number is up, positive number is down). Then capture 100 pixels of width, and 60 pixels of height, and that is the new image. This will crop and use 100 X 60 pixels of the center of the image.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeterOriginal]
Meter=Image
ImageName=#@#Images\lampoon.jpg
ImageAlpha=90
Code: Select all
[MeterTopLeft]
Meter=Image
X=0
Y=0
ImageName=#@#Images\lampoon.jpg
ImageCrop=0,0,200,200,1
Code: Select all
[MeterTopRight]
Meter=Image
X=250
Y=0
ImageName=#@#Images\lampoon.jpg
ImageCrop=-200,0,200,200,2
Code: Select all
[MeterBotLeft]
Meter=Image
X=0
Y=405
ImageName=#@#Images\lampoon.jpg
ImageCrop=0,-200,200,200,4
Code: Select all
[MeterBotRight]
Meter=Image
X=250
Y=405
ImageName=#@#Images\lampoon.jpg
ImageCrop=-200,-200,200,200,3
Code: Select all
[MeterCenter]
Meter=Image
X=125
Y=203
ImageName=#@#Images\lampoon.jpg
ImageCrop=-100,-100,200,200,5
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeterOriginal]
Meter=Image
ImageName=#@#Images\lampoon.jpg
ImageAlpha=90
[MeterBotLeft]
Meter=Image
X=0
Y=405
ImageName=#@#Images\lampoon.jpg
ImageCrop=0,-200,200,200,4
[MeterBotRight]
Meter=Image
X=250
Y=405
ImageName=#@#Images\lampoon.jpg
ImageCrop=-200,-200,200,200,3
[MeterTopLeft]
Meter=Image
X=0
Y=0
ImageName=#@#Images\lampoon.jpg
ImageCrop=0,0,200,200,1
[MeterTopRight]
Meter=Image
X=250
Y=0
ImageName=#@#Images\lampoon.jpg
ImageCrop=-200,0,200,200,2
[MeterCenter]
Meter=Image
X=125
Y=203
ImageName=#@#Images\lampoon.jpg
ImageCrop=-100,-100,200,200,5
Huh? It doesn't....TheOnlyMobyDank wrote:Great! I didn't realize that the cropping always originated from the top left... I thought that's what the origin was controlling. Thank you both for your help!