Vips.Image.identity
Description: Reference for Vips.Image.identity

### Constructor

# Vips Imageidentity

#### Declaration [src]

    int
    vips_identity (
      VipsImage** out,
      ...
    )

#### Description [src]

Creates an identity lookup table, ie. one which will leave an image unchanged when applied with `vips_maplut()`. Each entry in the table has a value equal to its position.

Use the arithmetic operations on these tables to make LUTs representing arbitrary functions.

Normally LUTs are 8-bit. Set `ushort` to create a 16-bit table.

Normally 16-bit tables have 65536 entries. You can set this smaller with `size`.

Optional arguments

- `bands`: `gint`, number of bands to create
- `ushort`: `gboolean`, `TRUE` for an unsigned short identity
- `size`: `gint`, number of LUT elements for a ushort image

See also

`vips_xyz()`, `vips_maplut()`.

This constructor is not directly available to language bindings.

#### Parameters

`out`

  Type: `VipsImage`

  Output image.

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

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.