This example uses an Array with a single 2-dimensional layer for a grayscale image.
Executing the Image command produces a function call, in which the supplied image has been encoded.
By using additional commands from the Layout Constructors package a nested function call can be produced which represents an entire worksheet.
That XML representation of a worksheet can be inserted directly.
A color image can also be supplied. The next example uses an Array with three 2-dimensional layers for a color image. The first layer initially represents the Hue layer in HSV colorspace, and the Array is recomputed in the RGB colorspace before being passed to the Image element constructor.
By default the dimensions of the Array are used to determine the height and width of the Image.
The image may also be specified with a file name, as a string.
The height and width options can be used to control the displayed dimensions of the Image.
An Image element can also be used as the content of a Table cell.
Note that Table cells' contents are automatically rescaled, on display, to fit the cell width. In this next example the Table is specified to have a width of 25 percent of the visible worksheet.
A numbered caption can be used.
The caption position is optional.