Method

VipsImagescale

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.

::: tip “Optional arguments” * log: gboolean, log scale pixels * exp: gdouble, exponent for log scale

::: seealso vips_cast().

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.
... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.