ImageTools
Stack
stack images horizontally or vertically
Calling Sequence
Parameters
Options
Description
Examples
Stack( img_list, dir, opts )
img_list
-
list(Image); images to stack
dir
horizontal or vertical; direction of stacking
opts
(optional) equation(s) of the form option = value; specify options for the Stack command
halign = left, center, or right
Specifies the horizontal alignment of vertically stacked images. The default is left.
valign = top, center, or bottom
Specifies the vertical alignment of horizontally stacked images. The default is top.
The Stack command stacks images to form a larger image.
The img_list parameter is a list of the images that are to be stacked. The images must have the same number of layers.
The optional dir parameter determines the stacking direction. Allowable values are horizontal and vertical. If horizontal, then the images are stacked horizontally, the first image in the list being the leftmost. If vertical, then the images are stacked vertically, the first image in the list being the topmost. The default is horizontal.
If the input images have different sizes, they are aligned according to the halign or valign options.
with⁡ImageTools:
img1≔Create⁡100,150,r,c↦evalf⁡0.5+0.5⋅sin⁡0.005+0.003⋅c⋅c⋅0.5+0.5⋅sin⁡0.15⋅r:
img2≔Create⁡120,120,r,c↦evalf⁡0.5+0.5⋅sin⁡0.01⋅c2+0.01⋅r2:
imga≔Stack⁡img1,img2,horizontal:
imgb≔Stack⁡img1,img2,horizontal,valign=center:
imgc≔Stack⁡img1,img2,horizontal,valign=bottom:
Embed⁡imga,imgb,imgc
imga≔Stack⁡img1,img2,vertical:
imgb≔Stack⁡img1,img2,vertical,halign=center:
imgc≔Stack⁡img1,img2,vertical,halign=right:
img_half≔Stack⁡Flip⁡img2,horizontal,img2,horizontal:
img_final≔Stack⁡Flip⁡img_half,vertical,img_half,vertical:
Embed⁡img_final
See Also
ImageTools[Flip]
ImageTools[View]
Download Help Document