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

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.