#include <vips/vips.h> int im_msb( IMAGE *in, IMAGE *out ); int im_msb_band( IMAGE *in, IMAGE *out, int band );
For a signed short (16 bit) image,
im_msb( in, out );
is equivalent to:
im_lintra( (1.0/256.0),
in, 128.0, temp );
im_clip2fmt( temp, out, IM_BANDFMT_UCHAR );
but much faster.
For any image which uses the whole range of values for its band format,
im_msb( in, out );
is equivalent to:
im_scale( in, out );
but a great deal faster, and without evaluating the input twice.
im_msb_band(3) is as im_msb(3) , except that all but one of the bands are also discarded.
im_msb_band( in, out, i );
is equivalent to:
im_msb( in, temp );
im_extract_bands( temp, out, i, 1 );
but again, faster.