Raster

Raster[{{a11, a12, ...}, ...}]
is a two-dimensional graphics primitive which represents a rectangular array of gray cells.

Raster[{{{r11, g11, b11}, ...}, ...}]
represents an array of RGB color cells.

Raster[{{{r11, g11, b11, 11}, ...}, ...}]
represents an array of color cells with opacity .

Raster[{{{a11, 11}, ...}, ...}]
represents an array of gray cells with the specified opacities.

Details and OptionsDetails and Options

  • Raster[array, ColorFunction->f] specifies that each cell should be colored using the graphics directives obtained by applying the function f to the value specified for that cell.
  • If array has dimensions , then Raster[array] is assumed to occupy the rectangle Rectangle[{0, 0}, {m, n}]. »
  • Raster[array, {{xmin, ymin}, {xmax, ymax}}] specifies that the raster should be taken instead to fill the rectangle Rectangle[{xmin, ymin}, {xmax, ymax}]. »
  • Scaled and Offset can be used to specify the coordinates for the rectangle.
  • Raster[array, Automatic] is equivalent to Raster[array, {{0, 0}, {m, n}}].
  • Raster[array, rect, {amin, amax}] specifies that cell values should be scaled so that corresponds to 0 and corresponds to 1. Cell values outside this range are clipped to be 0 or 1.
  • array can be a SparseArray object.
  • Image[Raster[...]] converts a Raster object to an image.
New in 2 | Last modified in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »