Skip to content
khanhas edited this page Jan 9, 2019 · 23 revisions

Basic usage:

MagickMeter can't display Image by itself, so it needs a Image meter that has MagickMeter plugin measure as MeasureName.

[MagickMeter_1]
Measure = Plugin
Plugin = MagickMeter
Image = File D:\homer.svg

[Image_1]
Meter = Image
MeasureName = MagickMeter_1

You can add more image into current canvas by appending Image2, Image3, ImageN in plugin measure:

[MagickMeter_1]
Measure = Plugin
Plugin = MagickMeter
Image  = File D:\homer.svg
Image2 = File E:\kanna.png
Image3 = File http://www.clker.com/cliparts/f/a/5/P/4/A/dark-green-marijuana-leaf-vector-format-md.png

True power of ImageMagick library is image manipulation. To use available effects and modifiers, you can add them right after image declaration:

Image = File D:\homer.svg | Scale 200% | Implode -1
Image2 = Text EXAMPLE FOR#CRLF#GitHub | Size 120 | Shadow 80,10,20,0 ; FF5050
Image3 = File E:\Weed420Meme.jpg | AdaptiveBlur 0,20

Measure options:

Image, Image2, ..., ImageN

Parameter:

ImageType TypeParameter | Modifier ModifierParmeter | Effect EffectParameter

Valid image types:

OnFinishAction

Specify a bang or chain of bangs to be executed after rendering process is finished. Any sort of Rainmeter variables's value used in this option is re-read at the moment it is executed, so you do not need to set DynamicVariables = 1 for MagickMeter plugin measure.
Note: Do not use !Refresh current config or it will cause infinite refreshing loop and kill your machine CPU.

ExportTo

Define additional place to write final image. You can use any supported writable format (PNG, JPG, GIF,...). Example:

[Magickmeter]
...
ExportTo = D:\loliStash\animeNeko.jpg

General modifiers:

Particular modifiers of each type are applied first, then general modifiers are applied later, no matter where they stand in modifiers list.

All Effects modifiers can be used in any image type.

Color formats:

  • Hex format: RRGGBBAA
    Eg: FF00E4, 6C3EF0F0

  • Decimal format: RRR,GGG,BBB,AAA
    Eg: 124,24,60, 35,204,34,50, 255,0,0,50

  • hsl(HueDegree, Saturation, Lightness, Alpha)
    HueDegree: 0 to 360.
    Saturation, Lightness and Alpha: 0 to 100.
    Eg:

Image = Rectangle 0,0,300,400 | Color hsl(40,66,20) | StrokeColor hsl(60,33,11)
Image2 = File D:\example.png | Shadow 100,20,20,30 ; hsl(320,45,87)

Internal variables:

Used in types and effects modifier.

Format:

{ImageN:VariableName}

Range of N depends on where internal variable is used, it has to be equal or smaller than current image index.
Although internal variables of one image can be used on itself modifier, they're only available after all type's particular modifiers are applied first (raw image object). Then you can use them in general modifiers (Effects). If you accidentally use them on itself type's modifiers, they will just return 0.

Effect modifiers will not change position (except Move), size and colors. But bounding box and colors of Clone and Combine always be recalculated after their definition, so you can take advantage of this to update internal variables value of effect added image.

Valid VariableName:

  • X: Returns X position of raw image object's top left corner.

  • Y: Returns Y position of raw image object's top left corner.

  • W: Returns width of raw image object.

  • H: Returns height of raw image object.

  • ColorBG: Darkest color in

  • Color1: Interesting color 1

  • Color2: Interesting color 2

  • Color3: Interesting color 3

  • ColorFG: Lightest color

All colors are returned in decimal format.

Notes: Color1, Color2, Color3 are interesting colors that might are image's dominant colors or just different shades of ColorBG and ColorFG.

Example:

[MM]
Measure = Plugin
Plugin = MagickMeter
Image = File Screenshot | Resize 300,300,1 | Move 20,40
Image2 = Rectangle {Image:X}, {Image:Y}, 300, 300 | Color {Image:Color2},40

Bangs

!CommandMeasure MeasureName Update

Reread and recreate all images.

!CommandMeasure MeasureName "Reload ImageList"

Reread and recreate only images in ImageList

OnChangeAction = !CommandMeasure MM "Reload Image2,Image4,Image8"
IfTrueAction = !CommandMeasure MM2 "Reload Image3"