Skip to contents

tile duplicates an Image object one or more times along each of its two axes.

Usage

tile(image, ny = 1, nx = 1, target = "new")

Arguments

image

An Image object.

ny

A non-zero, positive integer specifying how many times the image is repeated along the vertical axis.

nx

A non-zero, positive integer specifying how many times the image is repeated along the horizontal axis.

target

The location where the results should be stored. It can take 2 values:

  • "new":a new Image object is created and the results are stored inside (the default).

  • An Image object:the results are stored in another existing Image object. This is fast and will not replace the content of image but will replace that of target. Note that if target does not the appropriate dimensions, number of channels, or bitdepth, it will be coerced automatically into the appropriate format.

Value

If target="new", the function returns an Image

object. If target is an Image object, the function returns nothing and modifies that Image object in place.

See also

Author

Simon Garnier, garnier@njit.edu

Examples

rnd <- zeros(360, 1, 1)
randu(rnd)
rnd_tiled <- tile(rnd, 1, 640)