Reference

Table of Contents  ▸  List of Commands  ▸  Mathematical Operators  ▸  mul◀  mmul    |    mul_channels  ▶

mul

Built-in command

Arguments:

Description:

Multiply selected images by specified value, image or mathematical expression, or compute the pointwise product of selected images.

(equivalent to shortcut command *).

See also:

add, sub, div.

Examples of use:

• Example #1

$ gmic image.jpg +mul 2 cut 0,255
Command: image.jpg +mul 2 cut 0,255
Command: image.jpg +mul 2 cut 0,255

• Example #2

$ gmic image.jpg (1,2,3,4,5,6,7,8) ri[-1] [0] mul[0] [-1]
Command: image.jpg (1,2,3,4,5,6,7,8) ri[-1] [0] mul[0] [-1]
Command: image.jpg (1,2,3,4,5,6,7,8) ri[-1] [0] mul[0] [-1]

• Example #3

$ gmic image.jpg mul '1-3*abs(x/w-0.5)' cut 0,255
Command: image.jpg mul '1-3*abs(x/w-0.5)' cut 0,255

• Example #4

$ gmic image.jpg +luminance negate[-1] +mul
Command: image.jpg +luminance negate[-1] +mul
Command: image.jpg +luminance negate[-1] +mul
Command: image.jpg +luminance negate[-1] +mul