Image Embedding - Maple Help

Home : Support : Online Help : System : Information : Updates : Maple 18 : Image Embedding

 Programmatic Image Embedding

Using the new command Embed in the ImageTools package, you can programmatically embed images directly into your current document. The Embed command provides the functionality to insert single images or tables of images, which is useful when you are creating or manipulating an image programmatically before you want to display it. Now the image can be created or modified and then displayed in the same code, without having to save them in a separate file.

The ImageTools package works with 2-D and 3-D datatype=float[8] Arrays. Such arrays can be imported from files with the Read command, and can be created or manipulated using commands from the ImageTools package.

Similar to how you can remove plots, you can remove any such embedded image or table of images by using the menu action Edit > Remove Output.

For additional details, including descriptions of the command options, see the Embed help page.

 > restart:
 > with(ImageTools):

Example

In this example, a 3-layer color image of the Julia set is created as an Array and then embedded.

 > img := Fractals:-EscapeTime:-Julia( 400, -1.6-1.0*I, 1.6+1.0*I, -0.84-0.23*I );
 ${\mathrm{img}}{:=}\left[\begin{array}{c}{\mathrm{1..400 x 1..400 x 1..3}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{{\mathrm{float}}}_{{8}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{C_order}}\end{array}\right]$ (1)
 > Embed( img );

In the next example, a table is embedded, with each cell containing an image.