Method

VipsImagemsb

Declaration [src]

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

Description [src]

Turn any integer image to 8-bit unsigned char by discarding all but the most significant byte. Signed values are converted to unsigned by adding 128.

Use band to make a one-band 8-bit image.

This operator also works for LABQ coding.

::: tip “Optional arguments” * band: gint, msb just this band

::: seealso vips_scale(), 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.