ImageMultiply

ImageMultiply[image,x]
multiplies each channel value in image by a factor x.

ImageMultiply[image1,image2]
gives an image in which each pixel is the product of the corresponding pixels in and .

ImageMultiply[image,expr1,expr2,]
multiplies all with image, where each can be either an image, a number, or a color value.

DetailsDetails

  • The image returned by ImageMultiply[image,] has the same dimensions as image.
  • In ImageMultiply[image,x], x can be a number normally in the range 0 to 1, a color, or a list of color channel values.
  • ImageMultiply[image,x] typically gives an image with the same underlying data type as image, clipping or truncating values if necessary. »
  • If the image dimensions are different, ImageMultiply[image1,image2] multiplies into the center of .
  • If or is a single-channel image, its values are multiplied by the values in each channel of the other image in ImageMultiply[image1,image2].
  • If and are both multichannel images, the values in each channel are multiplied separately.
  • ImageMultiply[image1,image2] gives an image with the largest type of either or , clipping or truncating values if necessary.
  • For binary images, ImageMultiply effectively finds the logical AND of pixel values.
  • ImageMultiply[image,expr1,expr2,] folds ImageMultiply on the list of arguments.
  • ImageMultiply[{image,expr1,expr2,}] is equivalent to ImageMultiply[image,expr1,expr2,].
  • ImageMultiply works with Image3D objects.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Mask an image by multiplying it with a grayscale image:

In[1]:=
Click for copyable input
Out[1]=

Brighten an RGB image by multiplying all pixels with a constant factor:

In[1]:=
Click for copyable input
Out[1]=

Logical AND of two binary images:

In[1]:=
Click for copyable input
Out[1]=

Colorize a binary 3D image:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2008
(7.0)
| Updated in 2014
(10.0)