Vips.Image.scale

### Method

# Vips Imagescale

#### Declaration [src]

    int
    vips_scale (
      VipsImage* in,
      VipsImage** out,
      ...
    )

#### Description [src]

Search the image for the maximum and minimum value, then return the image as unsigned 8-bit, scaled so that the maximum value is 255 and the minimum is zero.

If `log` is set, transform with log10(1.0 + pow(x, `exp`)) + .5, then scale so max == 255. By default, `exp` is 0.25.

Optional arguments

- `log`: `gboolean`, log scale pixels
- `exp`: `gdouble`, exponent for log scale

See also

`vips_cast()`.

This method 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 method 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.