Method
VipsImagecast
Declaration [src]
int
vips_cast (
VipsImage* in,
VipsImage** out,
VipsBandFormat format,
...
)
Description [src]
Convert in to format. You can convert between any pair of formats.
Floats are truncated (not rounded). Out of range values are clipped.
Casting from complex to real returns the real part.
If shift is TRUE, integer values are shifted up and down. For example,
casting from unsigned 8 bit to unsigned 16 bit would
shift every value left by 8 bits. The bottom bit is copied into the new
bits, so 255 would become 65535.
::: tip “Optional arguments”
* shift: gboolean, integer values are shifted
::: seealso
vips_scale(), vips_complexform(), vips_real(),
vips_imag(), vips_cast_uchar(), vips_msb().
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. | |
format |
VipsBandFormat |
Format to convert to. |
|
... |
none |
|