Icon-Compositor 0.0
Multiply
lhs * rhs The multiply operator works as
expected for numbers. It is also possible to multiply images
(pixel values) in various ways.
number * pixel
This form of multiply works by multiplying each color channel by
the number given. Only the color channels are affected, the
alpha channel is left alone. If you make the channels too
bright, they will clip at the maximum value. You can make an
image brighter by multiplying it by a number greater than one.
|
icomp '2 * |
dragon.png |
' -o |
multiply-dragon-double.png |
|
|
 |
|
|
You can make an image darker by multiplying it by a number less
than one.
|
icomp '0.5 * |
dragon.png |
' -o |
multiply-dragon-half.png |
|
|
 |
|
|
pixel * pixel
This form of multiply works by multiplying each of color channels
together to form the resulting color, including the alpha
channel. When combined with the monochrome function, this can be used
to change the color of icons:
|
icomp 'scale(HotPink *
monochrome( |
dragon.png |
), 0.6) over center |
document.png |
' -o |
multiply-dragon-hotpink.png |
|
|
 |
|
|
|
|
An interesting thing happens when you multiply by black:
|
icomp 'black * |
dragon.png |
' -o |
multiply-dragon-blask.png |
|
|
 |
|
|
This can be used as the mask argument (the second argument) of
the masked_by function.