It is currently March 28th, 2024, 9:27 am

Some help from kenz0 on the new ImageCrop function

Tips and Tricks from the Rainmeter Community
Post Reply
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Some help from kenz0 on the new ImageCrop function

Post by jsmorley »

Kenz0 has provided some really good guidelines on using the new ImageCrop feature for Image/Bar/Histogram/Rotator meters:

*************

ImageCrop=X, Y , Width, Height, (Origin number)
  • Origin number:
    1 = Top left
    2 = Top right
    3 = Bottom right
    4 = Bottom left
    5 = Center (both W and H)
  • X/Y/Width/Height are required value.
  • (Origin number) is an option to define an origin of X/Y. If a user does not define it, it applies default value. (default is 1)
  • You can also define a negative value to X and Y. But negative value to Width or Height is invalid value and a picture would change nothing.
  • If you define 0 to Width or Height, it's handled as a picture of zero width or zero height, and a picture would disappear as a result.
  • In the case which the defined region exceeded on the outside of the picture, the port is handled as transparent color. Transparent color is a port which is invisible and cannot be clicked, but it would exist as reserved region of the meter.
crop2.png
If you define ImageCrop like this, even if you don't know the size of the picture, the center of the picture would always be cropped to.
ImageCrop=-60, -60, 120, 120, 5
crop.png
Post Reply