Method

VipsImagepercent_lum

Declaration [src]

int
vips_percent_lum (
  VipsImage* in,
  double percent,
  double* threshold,
  ...
)

Description [src]

Optional arguments:

  • max: histogram upper bound in input unit (default 125.0)

Computes BT.709 luminance over in, builds a luminance histogram, and returns the value at the requested percentile in threshold.

The histogram is in the same unit as the input and covers [0, max]. For example, multiply by 80 to get nits for an scRGB (1.0 = 80 nits) input.

The input must be a 3-band (or more) float image. Extra bands beyond the first three are ignored.

See also

vips_percent().

This method is not directly available to language bindings.

Parameters

percent

Type: double

Percentile (0-100) of luminance to return.

threshold

Type: double*

Luminance value at the percentile, in input unit.

The argument will be set by the function.
...

Type: 

NULL-terminated list of optional named arguments.

Return value

Type: int

0 on success, -1 on error.