Method

VipsImagegrid

Declaration [src]

int
vips_grid (
  VipsImage* in,
  VipsImage** out,
  int tile_height,
  int across,
  int down,
  ...
)

Description [src]

Chop a tall thin image up into a set of tiles, lay the tiles out in a grid.

The input image should be a very tall, thin image containing a list of smaller images. Volumetric or time-sequence images are often laid out like this. This image is chopped into a series of tiles, each tile_height pixels high and the width of in. The tiles are then rearranged into a grid across tiles across and down tiles down in row-major order.

Supplying tile_height, across and down is not strictly necessary, we only really need two of these. Requiring three is a double-check that the image has the expected geometry.

::: seealso vips_embed(), vips_insert(), vips_join().

Parameters

out VipsImage
 

Output image.

 The argument will be set by the function.
 The instance takes ownership of the data, and is responsible for freeing it.
tile_height int
 

Chop into tiles this high.

across int
 

Tiles across.

down int
 

Tiles down.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.