Method

VipsImagescale

Declaration [src]

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

Description [src]

Optional arguments:

  • log: log scale pixels
  • exp: exponent for log scale

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.

See also: vips_cast().

This method is not directly available to language bindings.

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

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.