Loading...
Searching...
No Matches
VImage Class Reference

`#include <VImage8.h>`

Inheritance diagram for VImage:
[legend]
Collaboration diagram for VImage:
[legend]

## Public Member Functions

| VImage (VipsImage *image, VSteal steal=STEAL)
| VImage ()
VipsImage * | get_image () const
int | width () const
int | height () const
int | bands () const
VipsBandFormat | format () const
VipsCoding | coding () const
VipsInterpretation | interpretation () const
VipsInterpretation | guess_interpretation () const
double | xres () const
double | yres () const
int | xoffset () const
int | yoffset () const
bool | has_alpha () const
const char * | filename () const
VImage | gainmap () const
void | inplace ()
const void * | data () const
void | set (const char *field, int value)
void | set (const char *field, int *value, int n)
void | set (const char *field, std::vector< int > value)
void | set (const char *field, double *value, int n)
void | set (const char *field, std::vector< double > value)
void | set (const char *field, double value)
void | set (const char *field, const char *value)
void | set (const char *field, VipsCallbackFn free_fn, void *data, size_t length)
void | set (const char *field, const VImage value)
GType | get_typeof (const char *field) const
int | get_int (const char *field) const
void | get_array_int (const char *field, int **out, int *n) const
std::vector< int > | get_array_int (const char *field) const
void | get_array_double (const char *field, double **out, int *n) const
std::vector< double > | get_array_double (const char *field) const
double | get_double (const char *field) const
const char * | get_string (const char *field) const
const void * | get_blob (const char *field, size_t *length) const
bool | remove (const char *name) const
VImage | new_from_image (std::vector< double > pixel) const
VImage | new_from_image (double pixel) const
VImage | copy_memory () const
VImage | write (VImage out) const
void | write_to_file (const char *name, VOption *options=nullptr) const
void | write_to_buffer (const char *suffix, void **buf, size_t *size, VOption *options=nullptr) const
void | write_to_target (const char *suffix, VTarget target, VOption *options=nullptr) const
void * | write_to_memory (size_t *size) const
VRegion | region () const
VRegion | region (VipsRect *rect) const
VRegion | region (int left, int top, int width, int height) const
VImage | linear (double a, double b, VOption *options=nullptr) const
VImage | linear (std::vector< double > a, double b, VOption *options=nullptr) const
VImage | linear (double a, std::vector< double > b, VOption *options=nullptr) const
std::vector< VImage > | bandsplit (VOption *options=nullptr) const
VImage | bandjoin (VImage other, VOption *options=nullptr) const
VImage | bandjoin (double other, VOption *options=nullptr) const
VImage | bandjoin (std::vector< double > other, VOption *options=nullptr) const
VImage | composite (VImage other, VipsBlendMode mode, VOption *options=nullptr) const
std::complex< double > | minpos (VOption *options=nullptr) const
std::complex< double > | maxpos (VOption *options=nullptr) const
VImage | fliphor (VOption *options=nullptr) const
VImage | flipver (VOption *options=nullptr) const
VImage | rot90 (VOption *options=nullptr) const
VImage | rot180 (VOption *options=nullptr) const
VImage | rot270 (VOption *options=nullptr) const
VImage | dilate (VImage mask, VOption *options=nullptr) const
VImage | erode (VImage mask, VOption *options=nullptr) const
VImage | median (int size=3, VOption *options=nullptr) const
VImage | floor (VOption *options=nullptr) const
VImage | ceil (VOption *options=nullptr) const
VImage | rint (VOption *options=nullptr) const
VImage | bandand (VOption *options=nullptr) const
VImage | bandor (VOption *options=nullptr) const
VImage | bandeor (VOption *options=nullptr) const
VImage | real (VOption *options=nullptr) const
VImage | imag (VOption *options=nullptr) const
VImage | polar (VOption *options=nullptr) const
VImage | rect (VOption *options=nullptr) const
VImage | conj (VOption *options=nullptr) const
VImage | sin (VOption *options=nullptr) const
VImage | cos (VOption *options=nullptr) const
VImage | tan (VOption *options=nullptr) const
VImage | asin (VOption *options=nullptr) const
VImage | acos (VOption *options=nullptr) const
VImage | atan (VOption *options=nullptr) const
VImage | sinh (VOption *options=nullptr) const
VImage | cosh (VOption *options=nullptr) const
VImage | tanh (VOption *options=nullptr) const
VImage | asinh (VOption *options=nullptr) const
VImage | acosh (VOption *options=nullptr) const
VImage | atanh (VOption *options=nullptr) const
VImage | log (VOption *options=nullptr) const
VImage | log10 (VOption *options=nullptr) const
VImage | exp (VOption *options=nullptr) const
VImage | exp10 (VOption *options=nullptr) const
VImage | pow (VImage other, VOption *options=nullptr) const
VImage | pow (double other, VOption *options=nullptr) const
VImage | pow (std::vector< double > other, VOption *options=nullptr) const
VImage | wop (VImage other, VOption *options=nullptr) const
VImage | wop (double other, VOption *options=nullptr) const
VImage | wop (std::vector< double > other, VOption *options=nullptr) const
VImage | atan2 (VImage other, VOption *options=nullptr) const
VImage | atan2 (double other, VOption *options=nullptr) const
VImage | atan2 (std::vector< double > other, VOption *options=nullptr) const
VImage | ifthenelse (std::vector< double > th, VImage el, VOption *options=nullptr) const
VImage | ifthenelse (VImage th, std::vector< double > el, VOption *options=nullptr) const
VImage | ifthenelse (std::vector< double > th, std::vector< double > el, VOption *options=nullptr) const
VImage | ifthenelse (double th, VImage el, VOption *options=nullptr) const
VImage | ifthenelse (VImage th, double el, VOption *options=nullptr) const
VImage | ifthenelse (double th, double el, VOption *options=nullptr) const
void | draw_circle (double ink, int cx, int cy, int radius, VOption *options=nullptr) const
void | draw_line (double ink, int x1, int y1, int x2, int y2, VOption *options=nullptr) const
void | draw_rect (double ink, int left, int top, int width, int height, VOption *options=nullptr) const
void | draw_point (double ink, int x, int y, VOption *options=nullptr) const
void | draw_point (std::vector< double > ink, int x, int y, VOption *options=nullptr) const
void | draw_flood (double ink, int x, int y, VOption *options=nullptr) const
void | draw_mask (double ink, VImage mask, int x, int y, VOption *options=nullptr) const
VImage | operator[] (int index) const
std::vector< double > | operator() (int x, int y) const
void | rawsave_fd (int fd, VOption *options=nullptr) const
VImage | CMC2LCh (VOption *options=nullptr) const
VImage | CMYK2XYZ (VOption *options=nullptr) const
VImage | HSV2sRGB (VOption *options=nullptr) const
VImage | LCh2CMC (VOption *options=nullptr) const
VImage | LCh2Lab (VOption *options=nullptr) const
VImage | Lab2LCh (VOption *options=nullptr) const
VImage | Lab2LabQ (VOption *options=nullptr) const
VImage | Lab2LabS (VOption *options=nullptr) const
VImage | Lab2XYZ (VOption *options=nullptr) const
VImage | LabQ2Lab (VOption *options=nullptr) const
VImage | LabQ2LabS (VOption *options=nullptr) const
VImage | LabQ2sRGB (VOption *options=nullptr) const
VImage | LabS2Lab (VOption *options=nullptr) const
VImage | LabS2LabQ (VOption *options=nullptr) const
VImage | Oklab2Oklch (VOption *options=nullptr) const
VImage | Oklab2XYZ (VOption *options=nullptr) const
VImage | Oklch2Oklab (VOption *options=nullptr) const
VImage | XYZ2CMYK (VOption *options=nullptr) const
VImage | XYZ2Lab (VOption *options=nullptr) const
VImage | XYZ2Oklab (VOption *options=nullptr) const
VImage | XYZ2Yxy (VOption *options=nullptr) const
VImage | XYZ2scRGB (VOption *options=nullptr) const
VImage | Yxy2XYZ (VOption *options=nullptr) const
VImage | abs (VOption *options=nullptr) const
VImage | add (VImage right, VOption *options=nullptr) const
VImage | addalpha (VOption *options=nullptr) const
VImage | affine (std::vector< double > matrix, VOption *options=nullptr) const
VImage | autorot (VOption *options=nullptr) const
double | avg (VOption *options=nullptr) const
VImage | bandbool (VipsOperationBoolean boolean, VOption *options=nullptr) const
VImage | bandfold (VOption *options=nullptr) const
VImage | bandjoin_const (std::vector< double > c, VOption *options=nullptr) const
VImage | bandmean (VOption *options=nullptr) const
VImage | bandunfold (VOption *options=nullptr) const
VImage | boolean (VImage right, VipsOperationBoolean boolean, VOption *options=nullptr) const
VImage | boolean_const (VipsOperationBoolean boolean, std::vector< double > c, VOption *options=nullptr) const
VImage | buildlut (VOption *options=nullptr) const
VImage | byteswap (VOption *options=nullptr) const
G_DEPRECATED VImage | cache (VOption *options=nullptr) const
VImage | canny (VOption *options=nullptr) const
VImage | case_image (std::vector< VImage > cases, VOption *options=nullptr) const
VImage | cast (VipsBandFormat format, VOption *options=nullptr) const
VImage | clamp (VOption *options=nullptr) const
VImage | colourspace (VipsInterpretation space, VOption *options=nullptr) const
VImage | compass (VImage mask, VOption *options=nullptr) const
VImage | complex (VipsOperationComplex cmplx, VOption *options=nullptr) const
VImage | complex2 (VImage right, VipsOperationComplex2 cmplx, VOption *options=nullptr) const
VImage | complexform (VImage right, VOption *options=nullptr) const
VImage | complexget (VipsOperationComplexget get, VOption *options=nullptr) const
VImage | composite2 (VImage overlay, VipsBlendMode mode, VOption *options=nullptr) const
VImage | conv (VImage mask, VOption *options=nullptr) const
VImage | conva (VImage mask, VOption *options=nullptr) const
VImage | convasep (VImage mask, VOption *options=nullptr) const
VImage | convf (VImage mask, VOption *options=nullptr) const
VImage | convi (VImage mask, VOption *options=nullptr) const
VImage | convsep (VImage mask, VOption *options=nullptr) const
VImage | copy (VOption *options=nullptr) const
double | countlines (VipsDirection direction, VOption *options=nullptr) const
VImage | crop (int left, int top, int width, int height, VOption *options=nullptr) const
void | csvsave (const char *filename, VOption *options=nullptr) const
void | csvsave_target (VTarget target, VOption *options=nullptr) const
VImage | dE00 (VImage right, VOption *options=nullptr) const
VImage | dE76 (VImage right, VOption *options=nullptr) const
VImage | dECMC (VImage right, VOption *options=nullptr) const
double | deviate (VOption *options=nullptr) const
VImage | divide (VImage right, VOption *options=nullptr) const
void | draw_circle (std::vector< double > ink, int cx, int cy, int radius, VOption *options=nullptr) const
void | draw_flood (std::vector< double > ink, int x, int y, VOption *options=nullptr) const
void | draw_image (VImage sub, int x, int y, VOption *options=nullptr) const
void | draw_line (std::vector< double > ink, int x1, int y1, int x2, int y2, VOption *options=nullptr) const
void | draw_mask (std::vector< double > ink, VImage mask, int x, int y, VOption *options=nullptr) const
void | draw_rect (std::vector< double > ink, int left, int top, int width, int height, VOption *options=nullptr) const
void | draw_smudge (int left, int top, int width, int height, VOption *options=nullptr) const
void | dzsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | dzsave_buffer (VOption *options=nullptr) const
void | dzsave_target (VTarget target, VOption *options=nullptr) const
VImage | embed (int x, int y, int width, int height, VOption *options=nullptr) const
VImage | extract_area (int left, int top, int width, int height, VOption *options=nullptr) const
VImage | extract_band (int band, VOption *options=nullptr) const
VImage | falsecolour (VOption *options=nullptr) const
VImage | fastcor (VImage ref, VOption *options=nullptr) const
VImage | fill_nearest (VOption *options=nullptr) const
int | find_trim (int *top, int *width, int *height, VOption *options=nullptr) const
void | fitssave (const char *filename, VOption *options=nullptr) const
VImage | flatten (VOption *options=nullptr) const
VImage | flip (VipsDirection direction, VOption *options=nullptr) const
VImage | float2rad (VOption *options=nullptr) const
VImage | freqmult (VImage mask, VOption *options=nullptr) const
VImage | fwfft (VOption *options=nullptr) const
VImage | gamma (VOption *options=nullptr) const
VImage | gaussblur (double sigma, VOption *options=nullptr) const
std::vector< double > | getpoint (int x, int y, VOption *options=nullptr) const
void | gifsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | gifsave_buffer (VOption *options=nullptr) const
void | gifsave_target (VTarget target, VOption *options=nullptr) const
VImage | globalbalance (VOption *options=nullptr) const
VImage | gravity (VipsCompassDirection direction, int width, int height, VOption *options=nullptr) const
VImage | grid (int tile_height, int across, int down, VOption *options=nullptr) const
void | heifsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | heifsave_buffer (VOption *options=nullptr) const
void | heifsave_target (VTarget target, VOption *options=nullptr) const
VImage | hist_cum (VOption *options=nullptr) const
double | hist_entropy (VOption *options=nullptr) const
VImage | hist_equal (VOption *options=nullptr) const
VImage | hist_find (VOption *options=nullptr) const
VImage | hist_find_indexed (VImage index, VOption *options=nullptr) const
VImage | hist_find_ndim (VOption *options=nullptr) const
bool | hist_ismonotonic (VOption *options=nullptr) const
VImage | hist_local (int width, int height, VOption *options=nullptr) const
VImage | hist_match (VImage ref, VOption *options=nullptr) const
VImage | hist_norm (VOption *options=nullptr) const
VImage | hist_plot (VOption *options=nullptr) const
VImage | hough_circle (VOption *options=nullptr) const
VImage | hough_line (VOption *options=nullptr) const
VImage | icc_export (VOption *options=nullptr) const
VImage | icc_import (VOption *options=nullptr) const
VImage | icc_transform (const char *output_profile, VOption *options=nullptr) const
VImage | ifthenelse (VImage in1, VImage in2, VOption *options=nullptr) const
VImage | insert (VImage sub, int x, int y, VOption *options=nullptr) const
VImage | invert (VOption *options=nullptr) const
VImage | invertlut (VOption *options=nullptr) const
VImage | invfft (VOption *options=nullptr) const
VImage | join (VImage in2, VipsDirection direction, VOption *options=nullptr) const
void | jp2ksave (const char *filename, VOption *options=nullptr) const
VipsBlob * | jp2ksave_buffer (VOption *options=nullptr) const
void | jp2ksave_target (VTarget target, VOption *options=nullptr) const
void | jpegsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | jpegsave_buffer (VOption *options=nullptr) const
void | jpegsave_mime (VOption *options=nullptr) const
void | jpegsave_target (VTarget target, VOption *options=nullptr) const
void | jxlsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | jxlsave_buffer (VOption *options=nullptr) const
void | jxlsave_target (VTarget target, VOption *options=nullptr) const
VImage | labelregions (VOption *options=nullptr) const
VImage | linear (std::vector< double > a, std::vector< double > b, VOption *options=nullptr) const
VImage | linecache (VOption *options=nullptr) const
void | magicksave (const char *filename, VOption *options=nullptr) const
VipsBlob * | magicksave_buffer (VOption *options=nullptr) const
VImage | mapim (VImage index, VOption *options=nullptr) const
VImage | maplut (VImage lut, VOption *options=nullptr) const
VImage | match (VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VOption *options=nullptr) const
VImage | math (VipsOperationMath math, VOption *options=nullptr) const
VImage | math2 (VImage right, VipsOperationMath2 math2, VOption *options=nullptr) const
VImage | math2_const (VipsOperationMath2 math2, std::vector< double > c, VOption *options=nullptr) const
VImage | matrixinvert (VOption *options=nullptr) const
VImage | matrixmultiply (VImage right, VOption *options=nullptr) const
void | matrixprint (VOption *options=nullptr) const
void | matrixsave (const char *filename, VOption *options=nullptr) const
void | matrixsave_target (VTarget target, VOption *options=nullptr) const
double | max (VOption *options=nullptr) const
VImage | maxpair (VImage right, VOption *options=nullptr) const
VImage | measure (int h, int v, VOption *options=nullptr) const
VImage | merge (VImage sec, VipsDirection direction, int dx, int dy, VOption *options=nullptr) const
double | min (VOption *options=nullptr) const
VImage | minpair (VImage right, VOption *options=nullptr) const
VImage | morph (VImage mask, VipsOperationMorphology morph, VOption *options=nullptr) const
VImage | mosaic (VImage sec, VipsDirection direction, int xref, int yref, int xsec, int ysec, VOption *options=nullptr) const
VImage | mosaic1 (VImage sec, VipsDirection direction, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VOption *options=nullptr) const
VImage | msb (VOption *options=nullptr) const
VImage | multiply (VImage right, VOption *options=nullptr) const
void | niftisave (const char *filename, VOption *options=nullptr) const
int | percent (double percent, VOption *options=nullptr) const
VImage | phasecor (VImage in2, VOption *options=nullptr) const
void | pngsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | pngsave_buffer (VOption *options=nullptr) const
void | pngsave_target (VTarget target, VOption *options=nullptr) const
void | ppmsave (const char *filename, VOption *options=nullptr) const
void | ppmsave_target (VTarget target, VOption *options=nullptr) const
VImage | premultiply (VOption *options=nullptr) const
VImage | prewitt (VOption *options=nullptr) const
VImage | profile (VImage *rows, VOption *options=nullptr) const
VImage | project (VImage *rows, VOption *options=nullptr) const
VImage | quadratic (VImage coeff, VOption *options=nullptr) const
VImage | rad2float (VOption *options=nullptr) const
void | radsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | radsave_buffer (VOption *options=nullptr) const
void | radsave_target (VTarget target, VOption *options=nullptr) const
VImage | rank (int width, int height, int index, VOption *options=nullptr) const
void | rawsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | rawsave_buffer (VOption *options=nullptr) const
void | rawsave_target (VTarget target, VOption *options=nullptr) const
VImage | recomb (VImage m, VOption *options=nullptr) const
VImage | reduce (double hshrink, double vshrink, VOption *options=nullptr) const
VImage | reduceh (double hshrink, VOption *options=nullptr) const
VImage | reducev (double vshrink, VOption *options=nullptr) const
VImage | relational (VImage right, VipsOperationRelational relational, VOption *options=nullptr) const
VImage | relational_const (VipsOperationRelational relational, std::vector< double > c, VOption *options=nullptr) const
VImage | remainder (VImage right, VOption *options=nullptr) const
VImage | remainder_const (std::vector< double > c, VOption *options=nullptr) const
VImage | remosaic (const char *old_str, const char *new_str, VOption *options=nullptr) const
VImage | replicate (int across, int down, VOption *options=nullptr) const
VImage | resize (double scale, VOption *options=nullptr) const
VImage | rot (VipsAngle angle, VOption *options=nullptr) const
VImage | rot45 (VOption *options=nullptr) const
VImage | rotate (double angle, VOption *options=nullptr) const
VImage | round (VipsOperationRound round, VOption *options=nullptr) const
VImage | sRGB2HSV (VOption *options=nullptr) const
VImage | sRGB2scRGB (VOption *options=nullptr) const
VImage | scRGB2BW (VOption *options=nullptr) const
VImage | scRGB2XYZ (VOption *options=nullptr) const
VImage | scRGB2sRGB (VOption *options=nullptr) const
VImage | scale (VOption *options=nullptr) const
VImage | scharr (VOption *options=nullptr) const
VImage | sequential (VOption *options=nullptr) const
VImage | sharpen (VOption *options=nullptr) const
VImage | shrink (double hshrink, double vshrink, VOption *options=nullptr) const
VImage | shrinkh (int hshrink, VOption *options=nullptr) const
VImage | shrinkv (int vshrink, VOption *options=nullptr) const
VImage | sign (VOption *options=nullptr) const
VImage | similarity (VOption *options=nullptr) const
VImage | smartcrop (int width, int height, VOption *options=nullptr) const
VImage | sobel (VOption *options=nullptr) const
VImage | spcor (VImage ref, VOption *options=nullptr) const
VImage | spectrum (VOption *options=nullptr) const
VImage | stats (VOption *options=nullptr) const
VImage | stdif (int width, int height, VOption *options=nullptr) const
VImage | subsample (int xfac, int yfac, VOption *options=nullptr) const
VImage | subtract (VImage right, VOption *options=nullptr) const
VImage | thumbnail_image (int width, VOption *options=nullptr) const
void | tiffsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | tiffsave_buffer (VOption *options=nullptr) const
void | tiffsave_target (VTarget target, VOption *options=nullptr) const
VImage | tilecache (VOption *options=nullptr) const
VImage | transpose3d (VOption *options=nullptr) const
VImage | uhdr2scRGB (VOption *options=nullptr) const
void | uhdrsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | uhdrsave_buffer (VOption *options=nullptr) const
void | uhdrsave_target (VTarget target, VOption *options=nullptr) const
VImage | unpremultiply (VOption *options=nullptr) const
void | vipssave (const char *filename, VOption *options=nullptr) const
void | vipssave_target (VTarget target, VOption *options=nullptr) const
void | webpsave (const char *filename, VOption *options=nullptr) const
VipsBlob * | webpsave_buffer (VOption *options=nullptr) const
void | webpsave_mime (VOption *options=nullptr) const
void | webpsave_target (VTarget target, VOption *options=nullptr) const
VImage | wrap (VOption *options=nullptr) const
VImage | zoom (int xfac, int yfac, VOption *options=nullptr) const
bool | is_null () const
Public Member Functions inherited from VObject
| VObject (VipsObject *new_vobject, VSteal steal=STEAL)
| VObject (const VObject &a)
VObject & | operator= (const VObject &a)
VipsObject * | get_object () const
bool | is_null () const

## Static Public Member Functions

static VOption * | option ()
static void | call_option_string (const char *operation_name, const char *option_string, VOption *options=nullptr)
static void | call (const char *operation_name, VOption *options=nullptr)
static VImage | new_memory ()
static VImage | new_temp_file (const char *file_format=".v")
static VImage | new_from_file (const char *name, VOption *options=nullptr)
static VImage | new_from_buffer (const void *buf, size_t len, const char *option_string, VOption *options=nullptr)
static VImage | new_from_buffer (const std::string &buf, const char *option_string, VOption *options=nullptr)
static VImage | new_from_source (VSource source, const char *option_string, VOption *options=nullptr)
static VImage | new_from_memory (const void *data, size_t size, int width, int height, int bands, VipsBandFormat format)
static VImage | new_from_memory_copy (const void *data, size_t size, int width, int height, int bands, VipsBandFormat format)
static VImage | new_from_memory_steal (const void *data, size_t size, int width, int height, int bands, VipsBandFormat format)
static VImage | new_matrix (int width, int height)
static VImage | new_matrix (int width, int height, double *array, int size)
static VImage | new_matrixv (int width, int height,...)
static VImage | thumbnail_buffer (void *buf, size_t len, int width, VOption *options=nullptr)
static VImage | new_from_memory_steal (void *data, size_t size, int width, int height, int bands, VipsBandFormat format)
static VImage | analyzeload (const char *filename, VOption *options=nullptr)
static VImage | arrayjoin (std::vector< VImage > in, VOption *options=nullptr)
static VImage | bandjoin (std::vector< VImage > in, VOption *options=nullptr)
static VImage | bandrank (std::vector< VImage > in, VOption *options=nullptr)
static VImage | black (int width, int height, VOption *options=nullptr)
static VImage | composite (std::vector< VImage > in, std::vector< int > mode, VOption *options=nullptr)
static VImage | csvload (const char *filename, VOption *options=nullptr)
static VImage | csvload_source (VSource source, VOption *options=nullptr)
static VImage | dcrawload (const char *filename, VOption *options=nullptr)
static VImage | dcrawload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | dcrawload_source (VSource source, VOption *options=nullptr)
static VImage | eye (int width, int height, VOption *options=nullptr)
static VImage | fitsload (const char *filename, VOption *options=nullptr)
static VImage | fitsload_source (VSource source, VOption *options=nullptr)
static VImage | fractsurf (int width, int height, double fractal_dimension, VOption *options=nullptr)
static VImage | gaussmat (double sigma, double min_ampl, VOption *options=nullptr)
static VImage | gaussnoise (int width, int height, VOption *options=nullptr)
static VImage | gifload (const char *filename, VOption *options=nullptr)
static VImage | gifload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | gifload_source (VSource source, VOption *options=nullptr)
static VImage | grey (int width, int height, VOption *options=nullptr)
static VImage | heifload (const char *filename, VOption *options=nullptr)
static VImage | heifload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | heifload_source (VSource source, VOption *options=nullptr)
static VImage | identity (VOption *options=nullptr)
static VImage | jp2kload (const char *filename, VOption *options=nullptr)
static VImage | jp2kload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | jp2kload_source (VSource source, VOption *options=nullptr)
static VImage | jpegload (const char *filename, VOption *options=nullptr)
static VImage | jpegload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | jpegload_source (VSource source, VOption *options=nullptr)
static VImage | jxlload (const char *filename, VOption *options=nullptr)
static VImage | jxlload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | jxlload_source (VSource source, VOption *options=nullptr)
static VImage | logmat (double sigma, double min_ampl, VOption *options=nullptr)
static VImage | magickload (const char *filename, VOption *options=nullptr)
static VImage | magickload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | magickload_source (VSource source, VOption *options=nullptr)
static VImage | mask_butterworth (int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, VOption *options=nullptr)
static VImage | mask_butterworth_band (int width, int height, double order, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, VOption *options=nullptr)
static VImage | mask_butterworth_ring (int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, double ringwidth, VOption *options=nullptr)
static VImage | mask_fractal (int width, int height, double fractal_dimension, VOption *options=nullptr)
static VImage | mask_gaussian (int width, int height, double frequency_cutoff, double amplitude_cutoff, VOption *options=nullptr)
static VImage | mask_gaussian_band (int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, VOption *options=nullptr)
static VImage | mask_gaussian_ring (int width, int height, double frequency_cutoff, double amplitude_cutoff, double ringwidth, VOption *options=nullptr)
static VImage | mask_ideal (int width, int height, double frequency_cutoff, VOption *options=nullptr)
static VImage | mask_ideal_band (int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, VOption *options=nullptr)
static VImage | mask_ideal_ring (int width, int height, double frequency_cutoff, double ringwidth, VOption *options=nullptr)
static VImage | matload (const char *filename, VOption *options=nullptr)
static VImage | matrixload (const char *filename, VOption *options=nullptr)
static VImage | matrixload_source (VSource source, VOption *options=nullptr)
static VImage | niftiload (const char *filename, VOption *options=nullptr)
static VImage | niftiload_source (VSource source, VOption *options=nullptr)
static VImage | openexrload (const char *filename, VOption *options=nullptr)
static VImage | openslideload (const char *filename, VOption *options=nullptr)
static VImage | openslideload_source (VSource source, VOption *options=nullptr)
static VImage | pdfload (const char *filename, VOption *options=nullptr)
static VImage | pdfload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | pdfload_source (VSource source, VOption *options=nullptr)
static VImage | perlin (int width, int height, VOption *options=nullptr)
static VImage | pngload (const char *filename, VOption *options=nullptr)
static VImage | pngload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | pngload_source (VSource source, VOption *options=nullptr)
static VImage | ppmload (const char *filename, VOption *options=nullptr)
static VImage | ppmload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | ppmload_source (VSource source, VOption *options=nullptr)
static VipsBlob * | profile_load (const char *name, VOption *options=nullptr)
static VImage | radload (const char *filename, VOption *options=nullptr)
static VImage | radload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | radload_source (VSource source, VOption *options=nullptr)
static VImage | rawload (const char *filename, int width, int height, int bands, VOption *options=nullptr)
static VImage | sdf (int width, int height, VipsSdfShape shape, VOption *options=nullptr)
static VImage | sines (int width, int height, VOption *options=nullptr)
static VImage | sum (std::vector< VImage > in, VOption *options=nullptr)
static VImage | svgload (const char *filename, VOption *options=nullptr)
static VImage | svgload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | svgload_source (VSource source, VOption *options=nullptr)
static VImage | switch_image (std::vector< VImage > tests, VOption *options=nullptr)
static void | system (const char *cmd_format, VOption *options=nullptr)
static VImage | text (const char *text, VOption *options=nullptr)
static VImage | thumbnail (const char *filename, int width, VOption *options=nullptr)
static VImage | thumbnail_buffer (VipsBlob *buffer, int width, VOption *options=nullptr)
static VImage | thumbnail_source (VSource source, int width, VOption *options=nullptr)
static VImage | tiffload (const char *filename, VOption *options=nullptr)
static VImage | tiffload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | tiffload_source (VSource source, VOption *options=nullptr)
static VImage | tonelut (VOption *options=nullptr)
static VImage | uhdrload (const char *filename, VOption *options=nullptr)
static VImage | uhdrload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | uhdrload_source (VSource source, VOption *options=nullptr)
static VImage | vipsload (const char *filename, VOption *options=nullptr)
static VImage | vipsload_source (VSource source, VOption *options=nullptr)
static VImage | webpload (const char *filename, VOption *options=nullptr)
static VImage | webpload_buffer (VipsBlob *buffer, VOption *options=nullptr)
static VImage | webpload_source (VSource source, VOption *options=nullptr)
static VImage | worley (int width, int height, VOption *options=nullptr)
static VImage | xyz (int width, int height, VOption *options=nullptr)
static VImage | zone (int width, int height, VOption *options=nullptr)

## Friends

VIPS_CPLUSPLUS_API VImage | operator+ (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator+ (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator+ (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator+ (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator+ (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator+= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator+= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator+= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator- (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator- (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator- (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator- (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator- (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator-= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator-= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator-= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator- (const VImage a)
VIPS_CPLUSPLUS_API VImage | operator* (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator* (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator* (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator* (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator* (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator*= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator*= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator*= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator/ (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator/ (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator/ (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator/ (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator/ (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator/= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator/= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator/= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator% (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator% (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator% (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator%= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator%= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator%= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator< (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator< (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator< (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator< (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator< (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator<= (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator<= (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator<= (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator<= (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator<= (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator> (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator> (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator> (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator> (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator> (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator>= (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator>= (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator>= (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator>= (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator>= (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator== (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator== (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator== (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator== (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator== (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator!= (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator!= (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator!= (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator!= (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator!= (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator& (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator& (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator& (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator& (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator& (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator&= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator&= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator&= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator| (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator| (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator| (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator| (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator| (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator|= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator|= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator|= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator^ (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator^ (const double a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator^ (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator^ (const std::vector< double > a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator^ (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator^= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator^= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator^= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator<< (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator<< (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator<< (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator<<= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator<<= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator<<= (VImage &a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage | operator>> (const VImage a, const VImage b)
VIPS_CPLUSPLUS_API VImage | operator>> (const VImage a, const double b)
VIPS_CPLUSPLUS_API VImage | operator>> (const VImage a, const std::vector< double > b)
VIPS_CPLUSPLUS_API VImage & | operator>>= (VImage &a, const VImage b)
VIPS_CPLUSPLUS_API VImage & | operator>>= (VImage &a, const double b)
VIPS_CPLUSPLUS_API VImage & | operator>>= (VImage &a, const std::vector< double > b)

## Detailed Description

An image object.

Image processing operations on images are member functions of VImage. For example:

    VImage in = VImage::new_from_file(argv[1], VImage::option()
        ->set("access", "sequential"));
    VImage out = in.embed(10, 10, 1000, 1000, VImage::option()
        ->set("extend", "copy"));
    out.write_to_file(argv[2]);

VImage objects are smart pointers over the underlying VipsImage objects. They manage the complications of GLib's ref and unref system for you.

## Constructor & Destructor Documentation

## VImage() [1/2]

VImage::VImage | ( | VipsImage * | image,
|  | VSteal | steal = STEAL )

inline explicit

Wrap a VImage around an underlying VipsImage object.

If steal is STEAL, then the VImage will take ownership of the reference to the VipsImage.

## VImage() [2/2]

VImage::VImage | ( |  | ) |

inline

An empty (NULL) VImage, eg. "VImage a;"

## Member Function Documentation

## abs()

VImage VImage::abs | ( | VOption * | options = nullptr | ) | const

Absolute value of an image.

Parameters

  options | Set of options.

Returns
  Output image.

## acos()

VImage VImage::acos | ( | VOption * | options = nullptr | ) | const

inline

Find the arc cosine of each pixel. Angles are in degrees.

## acosh()

VImage VImage::acosh | ( | VOption * | options = nullptr | ) | const

inline

Find the hyperbolic arc cosine of each pixel. Angles are in radians.

## add()

VImage VImage::add | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Add two images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## addalpha()

VImage VImage::addalpha | ( | VOption * | options = nullptr | ) | const

Append an alpha channel.

Parameters

  options | Set of options.

Returns
  Output image.

## affine()

VImage VImage::affine | ( | std::vector< double > | matrix,
|  | VOption * | options = nullptr ) const

Affine transform of an image.

Optional parameters

- interpolate – Interpolate pixels with this, VInterpolate.
- oarea – Area of output to generate, std::vector<int>.
- odx – Horizontal output displacement, double.
- ody – Vertical output displacement, double.
- idx – Horizontal input displacement, double.
- idy – Vertical input displacement, double.
- background – Background value, std::vector<double>.
- premultiplied – Images have premultiplied alpha, bool.
- extend – How to generate the extra pixels, VipsExtend.

Parameters

  matrix | Transformation matrix.
  options | Set of options.

Returns
  Output image.

## analyzeload()

VImage VImage::analyzeload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load an analyze6 image.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## arrayjoin()

VImage VImage::arrayjoin | ( | std::vector< VImage > | in,
|  | VOption * | options = nullptr )

static

Join an array of images.

Optional parameters

- across – Number of images across grid, int.
- shim – Pixels between images, int.
- background – Colour for new pixels, std::vector<double>.
- halign – Align on the left, centre or right, VipsAlign.
- valign – Align on the top, centre or bottom, VipsAlign.
- hspacing – Horizontal spacing between images, int.
- vspacing – Vertical spacing between images, int.

Parameters

  in | Array of input images.
  options | Set of options.

Returns
  Output image.

## asin()

VImage VImage::asin | ( | VOption * | options = nullptr | ) | const

inline

Find the arc sine of each pixel. Angles are in degrees.

## asinh()

VImage VImage::asinh | ( | VOption * | options = nullptr | ) | const

inline

Find the hyperbolic arc sine of each pixel. Angles are in radians.

## atan()

VImage VImage::atan | ( | VOption * | options = nullptr | ) | const

inline

Find the arc tangent of each pixel. Angles are in degrees.

## atan2() [1/3]

VImage VImage::atan2 | ( | double | other,
|  | VOption * | options = nullptr ) const

inline

Calculate atan2 of each pixel.

## atan2() [2/3]

VImage VImage::atan2 | ( | std::vector< double > | other,
|  | VOption * | options = nullptr ) const

inline

Calculate atan2 of each pixel.

## atan2() [3/3]

VImage VImage::atan2 | ( | VImage | other,
|  | VOption * | options = nullptr ) const

inline

Calculate atan2 of each pixel.

## atanh()

VImage VImage::atanh | ( | VOption * | options = nullptr | ) | const

inline

Find the hyperbolic arc tangent of each pixel. Angles are in radians.

## autorot()

VImage VImage::autorot | ( | VOption * | options = nullptr | ) | const

Autorotate image by exif tag.

Parameters

  options | Set of options.

Returns
  Output image.

## avg()

double VImage::avg | ( | VOption * | options = nullptr | ) | const

Find image average.

Parameters

  options | Set of options.

Returns
  Output value.

## bandand()

VImage VImage::bandand | ( | VOption * | options = nullptr | ) | const

inline

AND all bands of an image together to make a one-band image. Useful with the relational operators, for example:

    VImage mask = (in > 128).bandand()

## bandbool()

VImage VImage::bandbool | ( | VipsOperationBoolean | boolean,
|  | VOption * | options = nullptr ) const

Boolean operation across image bands.

Parameters

  boolean | Boolean to perform.
  options | Set of options.

Returns
  Output image.

## bandeor()

VImage VImage::bandeor | ( | VOption * | options = nullptr | ) | const

inline

EOR all bands of an image together to make a one-band image. Useful with the relational operators, for example:

    VImage mask = (in > 128).bandand()

## bandfold()

VImage VImage::bandfold | ( | VOption * | options = nullptr | ) | const

Fold up x axis into bands.

Optional parameters

- factor – Fold by this factor, int.

Parameters

  options | Set of options.

Returns
  Output image.

## bandjoin() [1/4]

VImage VImage::bandjoin | ( | double | other,
|  | VOption * | options = nullptr ) const

inline

Append a band to an image, with each element initialized to the constant value.

## bandjoin() [2/4]

VImage VImage::bandjoin | ( | std::vector< double > | other,
|  | VOption * | options = nullptr ) const

inline

Append a series of bands to an image, with each element initialized to the constant values.

## bandjoin() [3/4]

VImage VImage::bandjoin | ( | std::vector< VImage > | in,
|  | VOption * | options = nullptr )

static

Bandwise join a set of images.

Parameters

  in | Array of input images.
  options | Set of options.

Returns
  Output image.

## bandjoin() [4/4]

VImage VImage::bandjoin | ( | VImage | other,
|  | VOption * | options = nullptr ) const

Join two images bandwise.

## bandjoin_const()

VImage VImage::bandjoin_const | ( | std::vector< double > | c,
|  | VOption * | options = nullptr ) const

Append a constant band to an image.

Parameters

  c | Array of constants to add.
  options | Set of options.

Returns
  Output image.

## bandmean()

VImage VImage::bandmean | ( | VOption * | options = nullptr | ) | const

Band-wise average.

Parameters

  options | Set of options.

Returns
  Output image.

## bandor()

VImage VImage::bandor | ( | VOption * | options = nullptr | ) | const

inline

OR all bands of an image together to make a one-band image. Useful with the relational operators, for example:

    VImage mask = (in > 128).bandand()

## bandrank()

VImage VImage::bandrank | ( | std::vector< VImage > | in,
|  | VOption * | options = nullptr )

static

Band-wise rank of a set of images.

Optional parameters

- index – Select this band element from sorted list, int.

Parameters

  in | Array of input images.
  options | Set of options.

Returns
  Output image.

## bands()

int VImage::bands | ( |  | ) | const

inline

Return the number of image bands.

## bandsplit()

std::vector< VImage > VImage::bandsplit | ( | VOption * | options = nullptr | ) | const

Split a many-band image into an array of one-band images.

## bandunfold()

VImage VImage::bandunfold | ( | VOption * | options = nullptr | ) | const

Unfold image bands into x axis.

Optional parameters

- factor – Unfold by this factor, int.

Parameters

  options | Set of options.

Returns
  Output image.

## black()

VImage VImage::black | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make a black image.

Optional parameters

- bands – Number of bands in image, int.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## boolean()

VImage VImage::boolean | ( | VImage | right,
|  | VipsOperationBoolean | boolean,
|  | VOption * | options = nullptr ) const

Boolean operation on two images.

Parameters

  right | Right-hand image argument.
  boolean | Boolean to perform.
  options | Set of options.

Returns
  Output image.

## boolean_const()

VImage VImage::boolean_const | ( | VipsOperationBoolean | boolean,
|  | std::vector< double > | c,
|  | VOption * | options = nullptr ) const

Boolean operations against a constant.

Parameters

  boolean | Boolean to perform.
  c | Array of constants.
  options | Set of options.

Returns
  Output image.

## buildlut()

VImage VImage::buildlut | ( | VOption * | options = nullptr | ) | const

Build a look-up table.

Parameters

  options | Set of options.

Returns
  Output image.

## byteswap()

VImage VImage::byteswap | ( | VOption * | options = nullptr | ) | const

Byteswap an image.

Parameters

  options | Set of options.

Returns
  Output image.

## cache()

VImage VImage::cache | ( | VOption * | options = nullptr | ) | const

Cache an image.

Optional parameters

- max_tiles – Maximum number of tiles to cache, int.
- tile_height – Tile height in pixels, int.
- tile_width – Tile width in pixels, int.

Parameters

  options | Set of options.

Returns
  Output image.

## call()

void VImage::call | ( | const char * | operation_name,
|  | VOption * | options = nullptr )

static

Call any libvips operation.

## call_option_string()

void VImage::call_option_string | ( | const char * | operation_name,
|  | const char * | option_string,
|  | VOption * | options = nullptr )

static

Call any libvips operation, with a set of string-encoded options as well as VOption.

## canny()

VImage VImage::canny | ( | VOption * | options = nullptr | ) | const

Canny edge detector.

Optional parameters

- sigma – Sigma of Gaussian, double.
- precision – Convolve with this precision, VipsPrecision.

Parameters

  options | Set of options.

Returns
  Output image.

## case_image()

VImage VImage::case_image | ( | std::vector< VImage > | cases,
|  | VOption * | options = nullptr ) const

Use pixel values to pick cases from an array of images.

Parameters

  cases | Array of case images.
  options | Set of options.

Returns
  Output image.

## cast()

VImage VImage::cast | ( | VipsBandFormat | format,
|  | VOption * | options = nullptr ) const

Cast an image.

Optional parameters

- shift – Shift integer values up and down, bool.

Parameters

  format | Format to cast to.
  options | Set of options.

Returns
  Output image.

## ceil()

VImage VImage::ceil | ( | VOption * | options = nullptr | ) | const

inline

Convert to integer, rounding up.

## clamp()

VImage VImage::clamp | ( | VOption * | options = nullptr | ) | const

Clamp values of an image.

Optional parameters

- min – Minimum value, double.
- max – Maximum value, double.

Parameters

  options | Set of options.

Returns
  Output image.

## CMC2LCh()

VImage VImage::CMC2LCh | ( | VOption * | options = nullptr | ) | const

Transform lch to cmc.

Parameters

  options | Set of options.

Returns
  Output image.

## CMYK2XYZ()

VImage VImage::CMYK2XYZ | ( | VOption * | options = nullptr | ) | const

Transform cmyk to xyz.

Parameters

  options | Set of options.

Returns
  Output image.

## coding()

VipsCoding VImage::coding | ( |  | ) | const

inline

Return the image coding, for example VIPS_CODING_NONE.

## colourspace()

VImage VImage::colourspace | ( | VipsInterpretation | space,
|  | VOption * | options = nullptr ) const

Convert to a new colorspace.

Optional parameters

- source_space – Source color space, VipsInterpretation.

Parameters

  space | Destination color space.
  options | Set of options.

Returns
  Output image.

## compass()

VImage VImage::compass | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Convolve with rotating mask.

Optional parameters

- times – Rotate and convolve this many times, int.
- angle – Rotate mask by this much between convolutions, VipsAngle45.
- combine – Combine convolution results like this, VipsCombine.
- precision – Convolve with this precision, VipsPrecision.
- layers – Use this many layers in approximation, int.
- cluster – Cluster lines closer than this in approximation, int.

Parameters

  mask | Input matrix image.
  options | Set of options.

Returns
  Output image.

## complex()

VImage VImage::complex | ( | VipsOperationComplex | cmplx,
|  | VOption * | options = nullptr ) const

Perform a complex operation on an image.

Parameters

  cmplx | Complex to perform.
  options | Set of options.

Returns
  Output image.

## complex2()

VImage VImage::complex2 | ( | VImage | right,
|  | VipsOperationComplex2 | cmplx,
|  | VOption * | options = nullptr ) const

Complex binary operations on two images.

Parameters

  right | Right-hand image argument.
  cmplx | Binary complex operation to perform.
  options | Set of options.

Returns
  Output image.

## complexform()

VImage VImage::complexform | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Form a complex image from two real images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## complexget()

VImage VImage::complexget | ( | VipsOperationComplexget | get,
|  | VOption * | options = nullptr ) const

Get a component from a complex image.

Parameters

  get | Complex to perform.
  options | Set of options.

Returns
  Output image.

## composite() [1/2]

VImage VImage::composite | ( | std::vector< VImage > | in,
|  | std::vector< int > | mode,
|  | VOption * | options = nullptr )

static

Blend an array of images with an array of blend modes.

Optional parameters

- x – Array of x coordinates to join at, std::vector<int>.
- y – Array of y coordinates to join at, std::vector<int>.
- compositing_space – Composite images in this colour space, VipsInterpretation.
- premultiplied – Images have premultiplied alpha, bool.

Parameters

  in | Array of input images.
  mode | Array of VipsBlendMode to join with.
  options | Set of options.

Returns
  Output image.

## composite() [2/2]

VImage VImage::composite | ( | VImage | other,
|  | VipsBlendMode | mode,
|  | VOption * | options = nullptr ) const

Composite other on top of self using the specified blending mode.

## composite2()

VImage VImage::composite2 | ( | VImage | overlay,
|  | VipsBlendMode | mode,
|  | VOption * | options = nullptr ) const

Blend a pair of images with a blend mode.

Optional parameters

- x – x position of overlay, int.
- y – y position of overlay, int.
- compositing_space – Composite images in this colour space, VipsInterpretation.
- premultiplied – Images have premultiplied alpha, bool.

Parameters

  overlay | Overlay image.
  mode | VipsBlendMode to join with.
  options | Set of options.

Returns
  Output image.

## conj()

VImage VImage::conj | ( | VOption * | options = nullptr | ) | const

inline

Find the complex conjugate.

## conv()

VImage VImage::conv | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Convolution operation.

Optional parameters

- precision – Convolve with this precision, VipsPrecision.
- layers – Use this many layers in approximation, int.
- cluster – Cluster lines closer than this in approximation, int.

Parameters

  mask | Input matrix image.
  options | Set of options.

Returns
  Output image.

## conva()

VImage VImage::conva | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Approximate integer convolution.

Optional parameters

- layers – Use this many layers in approximation, int.
- cluster – Cluster lines closer than this in approximation, int.

Parameters

  mask | Input matrix image.
  options | Set of options.

Returns
  Output image.

## convasep()

VImage VImage::convasep | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Approximate separable integer convolution.

Optional parameters

- layers – Use this many layers in approximation, int.

Parameters

  mask | Input matrix image.
  options | Set of options.

Returns
  Output image.

## convf()

VImage VImage::convf | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Float convolution operation.

Parameters

  mask | Input matrix image.
  options | Set of options.

Returns
  Output image.

## convi()

VImage VImage::convi | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Int convolution operation.

Parameters

  mask | Input matrix image.
  options | Set of options.

Returns
  Output image.

## convsep()

VImage VImage::convsep | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Separable convolution operation.

Optional parameters

- precision – Convolve with this precision, VipsPrecision.
- layers – Use this many layers in approximation, int.
- cluster – Cluster lines closer than this in approximation, int.

Parameters

  mask | Input matrix image.
  options | Set of options.

Returns
  Output image.

## copy()

VImage VImage::copy | ( | VOption * | options = nullptr | ) | const

Copy an image.

Optional parameters

- width – Image width in pixels, int.
- height – Image height in pixels, int.
- bands – Number of bands in image, int.
- format – Pixel format in image, VipsBandFormat.
- coding – Pixel coding, VipsCoding.
- interpretation – Pixel interpretation, VipsInterpretation.
- xres – Horizontal resolution in pixels/mm, double.
- yres – Vertical resolution in pixels/mm, double.
- xoffset – Horizontal offset of origin, int.
- yoffset – Vertical offset of origin, int.

Parameters

  options | Set of options.

Returns
  Output image.

## copy_memory()

VImage VImage::copy_memory | ( |  | ) | const

inline

This operation allocates memory, renders self into it, builds a new image around the memory area, and returns that.

If the image is already a simple area of memory, it does nothing.

Call this before using the draw operations to make sure you have a memory image that can be modified.

VImage::copy() adds a null "copy" node to a pipeline. Use that instead if you want to change metadata and not pixels.

## cos()

VImage VImage::cos | ( | VOption * | options = nullptr | ) | const

inline

Find the cosine of each pixel. Angles are in degrees.

## cosh()

VImage VImage::cosh | ( | VOption * | options = nullptr | ) | const

inline

Find the hyperbolic cosine of each pixel. Angles are in degrees.

## countlines()

double VImage::countlines | ( | VipsDirection | direction,
|  | VOption * | options = nullptr ) const

Count lines in an image.

Parameters

  direction | Countlines left-right or up-down.
  options | Set of options.

Returns
  Number of lines.

## crop()

VImage VImage::crop | ( | int | left,
|  | int | top,
|  | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Extract an area from an image.

Parameters

  left | Left edge of extract area.
  top | Top edge of extract area.
  width | Width of extract area.
  height | Height of extract area.
  options | Set of options.

Returns
  Output image.

## csvload()

VImage VImage::csvload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load csv.

Optional parameters

- skip – Skip this many lines at the start of the file, int.
- lines – Read this many lines from the file, int.
- whitespace – Set of whitespace characters, const char *.
- separator – Set of separator characters, const char *.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## csvload_source()

VImage VImage::csvload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load csv.

Optional parameters

- skip – Skip this many lines at the start of the file, int.
- lines – Read this many lines from the file, int.
- whitespace – Set of whitespace characters, const char *.
- separator – Set of separator characters, const char *.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## csvsave()

void VImage::csvsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to csv.

Optional parameters

- separator – Separator characters, const char *.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## csvsave_target()

void VImage::csvsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image to csv.

Optional parameters

- separator – Separator characters, const char *.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## data()

const void * VImage::data | ( |  | ) | const

inline

Arrange for the underlying object to be entirely in memory, then return a pointer to the first pixel.

This can take a long time and need a very large amount of RAM.

## dcrawload()

VImage VImage::dcrawload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load raw camera files.

Optional parameters

- bitdepth – Number of bits per pixel, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## dcrawload_buffer()

VImage VImage::dcrawload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load raw camera files.

Optional parameters

- bitdepth – Number of bits per pixel, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## dcrawload_source()

VImage VImage::dcrawload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load raw camera files.

Optional parameters

- bitdepth – Number of bits per pixel, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## dE00()

VImage VImage::dE00 | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Calculate de00.

Parameters

  right | Right-hand input image.
  options | Set of options.

Returns
  Output image.

## dE76()

VImage VImage::dE76 | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Calculate de76.

Parameters

  right | Right-hand input image.
  options | Set of options.

Returns
  Output image.

## dECMC()

VImage VImage::dECMC | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Calculate decmc.

Parameters

  right | Right-hand input image.
  options | Set of options.

Returns
  Output image.

## deviate()

double VImage::deviate | ( | VOption * | options = nullptr | ) | const

Find image standard deviation.

Parameters

  options | Set of options.

Returns
  Output value.

## dilate()

VImage VImage::dilate | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

inline

Dilate the image with the specified structuring element, see VImage::new_matrix(). Structuring element values can be 0 for black, 255 for white and 128 for don't care. See VImage::morph().

## divide()

VImage VImage::divide | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Divide two images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## draw_circle() [1/2]

void VImage::draw_circle | ( | double | ink,
|  | int | cx,
|  | int | cy,
|  | int | radius,
|  | VOption * | options = nullptr ) const

inline

Draw a circle on an image.

Optional parameters

- fill – Draw a solid object, bool.

Parameters

  ink | Color for pixels.
  cx | Centre of draw_circle.
  cy | Centre of draw_circle.
  radius | Radius in pixels.
  options | Set of options.

## draw_circle() [2/2]

void VImage::draw_circle | ( | std::vector< double > | ink,
|  | int | cx,
|  | int | cy,
|  | int | radius,
|  | VOption * | options = nullptr ) const

Draw a circle on an image.

Optional parameters

- fill – Draw a solid object, bool.

Parameters

  ink | Color for pixels.
  cx | Centre of draw_circle.
  cy | Centre of draw_circle.
  radius | Radius in pixels.
  options | Set of options.

## draw_flood() [1/2]

void VImage::draw_flood | ( | double | ink,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

inline

Flood-fill an area.

Optional parameters

- test – Test pixels in this image, VImage.
- equal – DrawFlood while equal to edge, bool.

Parameters

  ink | Color for pixels.
  x | DrawFlood start point.
  y | DrawFlood start point.
  options | Set of options.

## draw_flood() [2/2]

void VImage::draw_flood | ( | std::vector< double > | ink,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

Flood-fill an area.

Optional parameters

- test – Test pixels in this image, VImage.
- equal – DrawFlood while equal to edge, bool.

Parameters

  ink | Color for pixels.
  x | DrawFlood start point.
  y | DrawFlood start point.
  options | Set of options.

## draw_image()

void VImage::draw_image | ( | VImage | sub,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

Paint an image into another image.

Optional parameters

- mode – Combining mode, VipsCombineMode.

Parameters

  sub | Sub-image to insert into main image.
  x | Draw image here.
  y | Draw image here.
  options | Set of options.

## draw_line() [1/2]

void VImage::draw_line | ( | double | ink,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2,
|  | VOption * | options = nullptr ) const

inline

Draw a line on an image.

Parameters

  ink | Color for pixels.
  x1 | Start of draw_line.
  y1 | Start of draw_line.
  x2 | End of draw_line.
  y2 | End of draw_line.
  options | Set of options.

## draw_line() [2/2]

void VImage::draw_line | ( | std::vector< double > | ink,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2,
|  | VOption * | options = nullptr ) const

Draw a line on an image.

Parameters

  ink | Color for pixels.
  x1 | Start of draw_line.
  y1 | Start of draw_line.
  x2 | End of draw_line.
  y2 | End of draw_line.
  options | Set of options.

## draw_mask() [1/2]

void VImage::draw_mask | ( | double | ink,
|  | VImage | mask,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

inline

Draw a mask on an image.

Parameters

  ink | Color for pixels.
  mask | Mask of pixels to draw.
  x | Draw mask here.
  y | Draw mask here.
  options | Set of options.

## draw_mask() [2/2]

void VImage::draw_mask | ( | std::vector< double > | ink,
|  | VImage | mask,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

Draw a mask on an image.

Parameters

  ink | Color for pixels.
  mask | Mask of pixels to draw.
  x | Draw mask here.
  y | Draw mask here.
  options | Set of options.

## draw_point() [1/2]

void VImage::draw_point | ( | double | ink,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

inline

Paint a single pixel on an image.

Parameters

  ink | Color for pixels.
  x | Point to paint.
  y | Point to paint.

## draw_point() [2/2]

void VImage::draw_point | ( | std::vector< double > | ink,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

inline

Paint a single pixel on an image.

Parameters

  ink | Color for pixels.
  x | Point to paint.
  y | Point to paint.

## draw_rect() [1/2]

void VImage::draw_rect | ( | double | ink,
|  | int | left,
|  | int | top,
|  | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

inline

Paint a rectangle on an image.

Optional parameters

- fill – Draw a solid object, bool.

Parameters

  ink | Color for pixels.
  left | Rect to fill.
  top | Rect to fill.
  width | Rect to fill.
  height | Rect to fill.
  options | Set of options.

## draw_rect() [2/2]

void VImage::draw_rect | ( | std::vector< double > | ink,
|  | int | left,
|  | int | top,
|  | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Paint a rectangle on an image.

Optional parameters

- fill – Draw a solid object, bool.

Parameters

  ink | Color for pixels.
  left | Rect to fill.
  top | Rect to fill.
  width | Rect to fill.
  height | Rect to fill.
  options | Set of options.

## draw_smudge()

void VImage::draw_smudge | ( | int | left,
|  | int | top,
|  | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Blur a rectangle on an image.

Parameters

  left | Rect to fill.
  top | Rect to fill.
  width | Rect to fill.
  height | Rect to fill.
  options | Set of options.

## dzsave()

void VImage::dzsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to deepzoom file.

Optional parameters

- imagename – Image name, const char *.
- layout – Directory layout, VipsForeignDzLayout.
- suffix – Filename suffix for tiles, const char *.
- overlap – Tile overlap in pixels, int.
- tile_size – Tile size in pixels, int.
- centre – Center image in tile, bool.
- depth – Pyramid depth, VipsForeignDzDepth.
- angle – Rotate image during save, VipsAngle.
- container – Pyramid container type, VipsForeignDzContainer.
- compression – ZIP deflate compression level, int.
- region_shrink – Method to shrink regions, VipsRegionShrink.
- skip_blanks – Skip tiles which are nearly equal to the background, int.
- id – Resource ID, const char *.
- Q – Q factor, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## dzsave_buffer()

VipsBlob * VImage::dzsave_buffer | ( | VOption * | options = nullptr | ) | const

Save image to dz buffer.

Optional parameters

- imagename – Image name, const char *.
- layout – Directory layout, VipsForeignDzLayout.
- suffix – Filename suffix for tiles, const char *.
- overlap – Tile overlap in pixels, int.
- tile_size – Tile size in pixels, int.
- centre – Center image in tile, bool.
- depth – Pyramid depth, VipsForeignDzDepth.
- angle – Rotate image during save, VipsAngle.
- container – Pyramid container type, VipsForeignDzContainer.
- compression – ZIP deflate compression level, int.
- region_shrink – Method to shrink regions, VipsRegionShrink.
- skip_blanks – Skip tiles which are nearly equal to the background, int.
- id – Resource ID, const char *.
- Q – Q factor, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## dzsave_target()

void VImage::dzsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image to deepzoom target.

Optional parameters

- imagename – Image name, const char *.
- layout – Directory layout, VipsForeignDzLayout.
- suffix – Filename suffix for tiles, const char *.
- overlap – Tile overlap in pixels, int.
- tile_size – Tile size in pixels, int.
- centre – Center image in tile, bool.
- depth – Pyramid depth, VipsForeignDzDepth.
- angle – Rotate image during save, VipsAngle.
- container – Pyramid container type, VipsForeignDzContainer.
- compression – ZIP deflate compression level, int.
- region_shrink – Method to shrink regions, VipsRegionShrink.
- skip_blanks – Skip tiles which are nearly equal to the background, int.
- id – Resource ID, const char *.
- Q – Q factor, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## embed()

VImage VImage::embed | ( | int | x,
|  | int | y,
|  | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Embed an image in a larger image.

Optional parameters

- extend – How to generate the extra pixels, VipsExtend.
- background – Color for background pixels, std::vector<double>.

Parameters

  x | Left edge of input in output.
  y | Top edge of input in output.
  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## erode()

VImage VImage::erode | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

inline

Erode the image with the specified structuring element, see VImage::new_matrix(). Structuring element values can be 0 for black, 255 for white and 128 for don't care. See VImage::morph().

## exp()

VImage VImage::exp | ( | VOption * | options = nullptr | ) | const

inline

Find e to the power of each pixel.

## exp10()

VImage VImage::exp10 | ( | VOption * | options = nullptr | ) | const

inline

Find 10 to the power of each pixel.

## extract_area()

VImage VImage::extract_area | ( | int | left,
|  | int | top,
|  | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Extract an area from an image.

Parameters

  left | Left edge of extract area.
  top | Top edge of extract area.
  width | Width of extract area.
  height | Height of extract area.
  options | Set of options.

Returns
  Output image.

## extract_band()

VImage VImage::extract_band | ( | int | band,
|  | VOption * | options = nullptr ) const

Extract band from an image.

Optional parameters

- n – Number of bands to extract, int.

Parameters

  band | Band to extract.
  options | Set of options.

Returns
  Output image.

## eye()

VImage VImage::eye | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make an image showing the eye's spatial response.

Optional parameters

- uchar – Output an unsigned char image, bool.
- factor – Maximum spatial frequency, double.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## falsecolour()

VImage VImage::falsecolour | ( | VOption * | options = nullptr | ) | const

False-color an image.

Parameters

  options | Set of options.

Returns
  Output image.

## fastcor()

VImage VImage::fastcor | ( | VImage | ref,
|  | VOption * | options = nullptr ) const

Fast correlation.

Parameters

  ref | Input reference image.
  options | Set of options.

Returns
  Output image.

## filename()

const char * VImage::filename | ( |  | ) | const

inline

The name of the file this image originally came from, or NULL if it's not a file image.

## fill_nearest()

VImage VImage::fill_nearest | ( | VOption * | options = nullptr | ) | const

Fill image zeros with nearest non-zero pixel.

Parameters

  options | Set of options.

Returns
  Value of nearest non-zero pixel.

## find_trim()

int VImage::find_trim | ( | int * | top,
|  | int * | width,
|  | int * | height,
|  | VOption * | options = nullptr ) const

Search an image for non-edge areas.

Optional parameters

- threshold – Object threshold, double.
- background – Color for background pixels, std::vector<double>.
- line_art – Enable line art mode, bool.

Parameters

  top | Top edge of extract area.
  width | Width of extract area.
  height | Height of extract area.
  options | Set of options.

Returns
  Left edge of image.

## fitsload()

VImage VImage::fitsload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load a fits image.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## fitsload_source()

VImage VImage::fitsload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load fits from a source.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## fitssave()

void VImage::fitssave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to fits file.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## flatten()

VImage VImage::flatten | ( | VOption * | options = nullptr | ) | const

Flatten alpha out of an image.

Optional parameters

- background – Background value, std::vector<double>.
- max_alpha – Maximum value of alpha channel, double.

Parameters

  options | Set of options.

Returns
  Output image.

## flip()

VImage VImage::flip | ( | VipsDirection | direction,
|  | VOption * | options = nullptr ) const

Flip an image.

Parameters

  direction | Direction to flip image.
  options | Set of options.

Returns
  Output image.

## fliphor()

VImage VImage::fliphor | ( | VOption * | options = nullptr | ) | const

inline

Flip the image left-right.

## flipver()

VImage VImage::flipver | ( | VOption * | options = nullptr | ) | const

inline

Flip the image top-bottom.

## float2rad()

VImage VImage::float2rad | ( | VOption * | options = nullptr | ) | const

Transform float rgb to radiance coding.

Parameters

  options | Set of options.

Returns
  Output image.

## floor()

VImage VImage::floor | ( | VOption * | options = nullptr | ) | const

inline

Convert to integer, rounding down.

## format()

VipsBandFormat VImage::format | ( |  | ) | const

inline

Return the image format, for example VIPS_FORMAT_UCHAR.

## fractsurf()

VImage VImage::fractsurf | ( | int | width,
|  | int | height,
|  | double | fractal_dimension,
|  | VOption * | options = nullptr )

static

Make a fractal surface.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  fractal_dimension | Fractal dimension.
  options | Set of options.

Returns
  Output image.

## freqmult()

VImage VImage::freqmult | ( | VImage | mask,
|  | VOption * | options = nullptr ) const

Frequency-domain filtering.

Parameters

  mask | Input mask image.
  options | Set of options.

Returns
  Output image.

## fwfft()

VImage VImage::fwfft | ( | VOption * | options = nullptr | ) | const

Forward fft.

Parameters

  options | Set of options.

Returns
  Output image.

## gainmap()

VImage VImage::gainmap | ( |  | ) | const

inline

The associated gainmap image, if any.

## gamma()

VImage VImage::gamma | ( | VOption * | options = nullptr | ) | const

Gamma an image.

Optional parameters

- exponent – Gamma factor, double.

Parameters

  options | Set of options.

Returns
  Output image.

## gaussblur()

VImage VImage::gaussblur | ( | double | sigma,
|  | VOption * | options = nullptr ) const

Gaussian blur.

Optional parameters

- min_ampl – Minimum amplitude of Gaussian, double.
- precision – Convolve with this precision, VipsPrecision.

Parameters

  sigma | Sigma of Gaussian.
  options | Set of options.

Returns
  Output image.

## gaussmat()

VImage VImage::gaussmat | ( | double | sigma,
|  | double | min_ampl,
|  | VOption * | options = nullptr )

static

Make a gaussian image.

Optional parameters

- separable – Generate separable Gaussian, bool.
- precision – Generate with this precision, VipsPrecision.

Parameters

  sigma | Sigma of Gaussian.
  min_ampl | Minimum amplitude of Gaussian.
  options | Set of options.

Returns
  Output image.

## gaussnoise()

VImage VImage::gaussnoise | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make a gaussnoise image.

Optional parameters

- sigma – Standard deviation of pixels in generated image, double.
- mean – Mean of pixels in generated image, double.
- seed – Random number seed, int.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## get_array_double() [1/2]

std::vector< double > VImage::get_array_double | ( | const char * | field | ) | const

inline

Get the value of a metadata item as an array of doubles.

If the item is not of this type, an exception is thrown.

## get_array_double() [2/2]

void VImage::get_array_double | ( | const char * | field,
|  | double ** | out,
|  | int * | n ) const

inline

Get the value of a metadata item as an array of doubles. Do not free the result.

If the item is not of this type, an exception is thrown.

## get_array_int() [1/2]

std::vector< int > VImage::get_array_int | ( | const char * | field | ) | const

inline

Get the value of a metadata item as an array of ints.

If the item is not of this type, an exception is thrown.

## get_array_int() [2/2]

void VImage::get_array_int | ( | const char * | field,
|  | int ** | out,
|  | int * | n ) const

inline

Get the value of a metadata item as an array of ints. Do not free the result.

If the item is not of this type, an exception is thrown.

## get_blob()

const void * VImage::get_blob | ( | const char * | field,
|  | size_t * | length ) const

inline

Get the value of a metadata item as a binary object. You must not free the result.

If the item is not of this type, an exception is thrown.

## get_double()

double VImage::get_double | ( | const char * | field | ) | const

inline

Get the value of a metadata item as a double.

If the item is not of this type, an exception is thrown.

## get_image()

VipsImage * VImage::get_image | ( |  | ) | const

inline

Return the underlying VipsImage reference that this VImage holds. This does not make a new reference – you'll need to g_object_ref() the pointer if you need it to last.

## get_int()

int VImage::get_int | ( | const char * | field | ) | const

inline

Get the value of a metadata item as an int.

If the item is not of this type, an exception is thrown.

## get_string()

const char * VImage::get_string | ( | const char * | field | ) | const

inline

Get the value of a metadata item as a string. You must not free the result.

If the item is not of this type, an exception is thrown.

## get_typeof()

GType VImage::get_typeof | ( | const char * | field | ) | const

inline

Return the GType of a metadata item, or 0 if the named item does not exist.

## getpoint()

std::vector< double > VImage::getpoint | ( | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

Read a point from an image.

Optional parameters

- unpack_complex – Complex pixels should be unpacked, bool.

Parameters

  x | Point to read.
  y | Point to read.
  options | Set of options.

Returns
  Array of output values.

## gifload()

VImage VImage::gifload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load gif with libnsgif.

Optional parameters

- n – Number of pages to load, -1 for all, int.
- page – First page to load, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## gifload_buffer()

VImage VImage::gifload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load gif with libnsgif.

Optional parameters

- n – Number of pages to load, -1 for all, int.
- page – First page to load, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## gifload_source()

VImage VImage::gifload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load gif from source.

Optional parameters

- n – Number of pages to load, -1 for all, int.
- page – First page to load, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## gifsave()

void VImage::gifsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save as gif.

Optional parameters

- dither – Amount of dithering, double.
- effort – Quantisation effort, int.
- bitdepth – Number of bits per pixel, int.
- interframe_maxerror – Maximum inter-frame error for transparency, double.
- reuse – Reuse palette from input, bool.
- interpalette_maxerror – Maximum inter-palette error for palette reusage, double.
- interlace – Generate an interlaced (progressive) GIF, bool.
- keep_duplicate_frames – Keep duplicate frames in the output instead of combining them, bool.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## gifsave_buffer()

VipsBlob * VImage::gifsave_buffer | ( | VOption * | options = nullptr | ) | const

Save as gif.

Optional parameters

- dither – Amount of dithering, double.
- effort – Quantisation effort, int.
- bitdepth – Number of bits per pixel, int.
- interframe_maxerror – Maximum inter-frame error for transparency, double.
- reuse – Reuse palette from input, bool.
- interpalette_maxerror – Maximum inter-palette error for palette reusage, double.
- interlace – Generate an interlaced (progressive) GIF, bool.
- keep_duplicate_frames – Keep duplicate frames in the output instead of combining them, bool.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## gifsave_target()

void VImage::gifsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save as gif.

Optional parameters

- dither – Amount of dithering, double.
- effort – Quantisation effort, int.
- bitdepth – Number of bits per pixel, int.
- interframe_maxerror – Maximum inter-frame error for transparency, double.
- reuse – Reuse palette from input, bool.
- interpalette_maxerror – Maximum inter-palette error for palette reusage, double.
- interlace – Generate an interlaced (progressive) GIF, bool.
- keep_duplicate_frames – Keep duplicate frames in the output instead of combining them, bool.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## globalbalance()

VImage VImage::globalbalance | ( | VOption * | options = nullptr | ) | const

Global balance an image mosaic.

Optional parameters

- gamma – Image gamma, double.
- int_output – Integer output, bool.

Parameters

  options | Set of options.

Returns
  Output image.

## gravity()

VImage VImage::gravity | ( | VipsCompassDirection | direction,
|  | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Place an image within a larger image with a certain gravity.

Optional parameters

- extend – How to generate the extra pixels, VipsExtend.
- background – Color for background pixels, std::vector<double>.

Parameters

  direction | Direction to place image within width/height.
  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## grey()

VImage VImage::grey | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make a grey ramp image.

Optional parameters

- uchar – Output an unsigned char image, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## grid()

VImage VImage::grid | ( | int | tile_height,
|  | int | across,
|  | int | down,
|  | VOption * | options = nullptr ) const

Grid an image.

Parameters

  tile_height | Chop into tiles this high.
  across | Number of tiles across.
  down | Number of tiles down.
  options | Set of options.

Returns
  Output image.

## guess_interpretation()

VipsInterpretation VImage::guess_interpretation | ( |  | ) | const

inline

Try to guess the image interpretation from other fields. This is handy if the interpretation has not been set correctly.

## has_alpha()

bool VImage::has_alpha | ( |  | ) | const

inline

TRUE if the image has an alpha channel.

## heifload()

VImage VImage::heifload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load a heif image.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- thumbnail – Fetch thumbnail image, bool.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## heifload_buffer()

VImage VImage::heifload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load a heif image.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- thumbnail – Fetch thumbnail image, bool.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## heifload_source()

VImage VImage::heifload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load a heif image.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- thumbnail – Fetch thumbnail image, bool.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## heifsave()

void VImage::heifsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image in heif format.

Optional parameters

- Q – Q factor, int.
- bitdepth – Number of bits per pixel, int.
- lossless – Enable lossless compression, bool.
- compression – Compression format, VipsForeignHeifCompression.
- effort – CPU effort, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- encoder – Select encoder to use, VipsForeignHeifEncoder.
- tune – Tuning parameters, const char *.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## heifsave_buffer()

VipsBlob * VImage::heifsave_buffer | ( | VOption * | options = nullptr | ) | const

Save image in heif format.

Optional parameters

- Q – Q factor, int.
- bitdepth – Number of bits per pixel, int.
- lossless – Enable lossless compression, bool.
- compression – Compression format, VipsForeignHeifCompression.
- effort – CPU effort, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- encoder – Select encoder to use, VipsForeignHeifEncoder.
- tune – Tuning parameters, const char *.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## heifsave_target()

void VImage::heifsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image in heif format.

Optional parameters

- Q – Q factor, int.
- bitdepth – Number of bits per pixel, int.
- lossless – Enable lossless compression, bool.
- compression – Compression format, VipsForeignHeifCompression.
- effort – CPU effort, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- encoder – Select encoder to use, VipsForeignHeifEncoder.
- tune – Tuning parameters, const char *.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## height()

int VImage::height | ( |  | ) | const

inline

Return the height of the image in pixels.

## hist_cum()

VImage VImage::hist_cum | ( | VOption * | options = nullptr | ) | const

Form cumulative histogram.

Parameters

  options | Set of options.

Returns
  Output image.

## hist_entropy()

double VImage::hist_entropy | ( | VOption * | options = nullptr | ) | const

Estimate image entropy.

Parameters

  options | Set of options.

Returns
  Output value.

## hist_equal()

VImage VImage::hist_equal | ( | VOption * | options = nullptr | ) | const

Histogram equalisation.

Optional parameters

- band – Equalise with this band, int.

Parameters

  options | Set of options.

Returns
  Output image.

## hist_find()

VImage VImage::hist_find | ( | VOption * | options = nullptr | ) | const

Find image histogram.

Optional parameters

- band – Find histogram of band, int.

Parameters

  options | Set of options.

Returns
  Output histogram.

## hist_find_indexed()

VImage VImage::hist_find_indexed | ( | VImage | index,
|  | VOption * | options = nullptr ) const

Find indexed image histogram.

Optional parameters

- combine – Combine bins like this, VipsCombine.

Parameters

  index | Index image.
  options | Set of options.

Returns
  Output histogram.

## hist_find_ndim()

VImage VImage::hist_find_ndim | ( | VOption * | options = nullptr | ) | const

Find n-dimensional image histogram.

Optional parameters

- bins – Number of bins in each dimension, int.

Parameters

  options | Set of options.

Returns
  Output histogram.

## hist_ismonotonic()

bool VImage::hist_ismonotonic | ( | VOption * | options = nullptr | ) | const

Test for monotonicity.

Parameters

  options | Set of options.

Returns
  true if in is monotonic.

## hist_local()

VImage VImage::hist_local | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Local histogram equalisation.

Optional parameters

- max_slope – Maximum slope (CLAHE), int.

Parameters

  width | Window width in pixels.
  height | Window height in pixels.
  options | Set of options.

Returns
  Output image.

## hist_match()

VImage VImage::hist_match | ( | VImage | ref,
|  | VOption * | options = nullptr ) const

Match two histograms.

Parameters

  ref | Reference histogram.
  options | Set of options.

Returns
  Output image.

## hist_norm()

VImage VImage::hist_norm | ( | VOption * | options = nullptr | ) | const

Normalise histogram.

Parameters

  options | Set of options.

Returns
  Output image.

## hist_plot()

VImage VImage::hist_plot | ( | VOption * | options = nullptr | ) | const

Plot histogram.

Parameters

  options | Set of options.

Returns
  Output image.

## hough_circle()

VImage VImage::hough_circle | ( | VOption * | options = nullptr | ) | const

Find hough circle transform.

Optional parameters

- scale – Scale down dimensions by this factor, int.
- min_radius – Smallest radius to search for, int.
- max_radius – Largest radius to search for, int.

Parameters

  options | Set of options.

Returns
  Output image.

## hough_line()

VImage VImage::hough_line | ( | VOption * | options = nullptr | ) | const

Find hough line transform.

Optional parameters

- width – Horizontal size of parameter space, int.
- height – Vertical size of parameter space, int.

Parameters

  options | Set of options.

Returns
  Output image.

## HSV2sRGB()

VImage VImage::HSV2sRGB | ( | VOption * | options = nullptr | ) | const

Transform hsv to srgb.

Parameters

  options | Set of options.

Returns
  Output image.

## icc_export()

VImage VImage::icc_export | ( | VOption * | options = nullptr | ) | const

Output to device with icc profile.

Optional parameters

- pcs – Set Profile Connection Space, VipsPCS.
- intent – Rendering intent, VipsIntent.
- black_point_compensation – Enable black point compensation, bool.
- output_profile – Filename to load output profile from, const char *.
- depth – Output device space depth in bits, int.

Parameters

  options | Set of options.

Returns
  Output image.

## icc_import()

VImage VImage::icc_import | ( | VOption * | options = nullptr | ) | const

Import from device with icc profile.

Optional parameters

- pcs – Set Profile Connection Space, VipsPCS.
- intent – Rendering intent, VipsIntent.
- black_point_compensation – Enable black point compensation, bool.
- embedded – Use embedded input profile, if available, bool.
- input_profile – Filename to load input profile from, const char *.

Parameters

  options | Set of options.

Returns
  Output image.

## icc_transform()

VImage VImage::icc_transform | ( | const char * | output_profile,
|  | VOption * | options = nullptr ) const

Transform between devices with icc profiles.

Optional parameters

- pcs – Set Profile Connection Space, VipsPCS.
- intent – Rendering intent, VipsIntent.
- black_point_compensation – Enable black point compensation, bool.
- embedded – Use embedded input profile, if available, bool.
- input_profile – Filename to load input profile from, const char *.
- depth – Output device space depth in bits, int.

Parameters

  output_profile | Filename to load output profile from.
  options | Set of options.

Returns
  Output image.

## identity()

VImage VImage::identity | ( | VOption * | options = nullptr | ) |

static

Make a 1d image where pixel values are indexes.

Optional parameters

- bands – Number of bands in LUT, int.
- ushort – Create a 16-bit LUT, bool.
- size – Size of 16-bit LUT, int.

Parameters

  options | Set of options.

Returns
  Output image.

## ifthenelse() [1/7]

VImage VImage::ifthenelse | ( | double | th,
|  | double | el,
|  | VOption * | options = nullptr ) const

inline

Use self as a conditional image (not zero meaning TRUE) to pick pixels from th (then) or el (else).

## ifthenelse() [2/7]

VImage VImage::ifthenelse | ( | double | th,
|  | VImage | el,
|  | VOption * | options = nullptr ) const

inline

Use self as a conditional image (not zero meaning TRUE) to pick pixels from th (then) or el (else).

## ifthenelse() [3/7]

VImage VImage::ifthenelse | ( | std::vector< double > | th,
|  | std::vector< double > | el,
|  | VOption * | options = nullptr ) const

inline

Use self as a conditional image (not zero meaning TRUE) to pick pixels from th (then) or el (else).

## ifthenelse() [4/7]

VImage VImage::ifthenelse | ( | std::vector< double > | th,
|  | VImage | el,
|  | VOption * | options = nullptr ) const

inline

Use self as a conditional image (not zero meaning TRUE) to pick pixels from th (then) or el (else).

## ifthenelse() [5/7]

VImage VImage::ifthenelse | ( | VImage | in1,
|  | VImage | in2,
|  | VOption * | options = nullptr ) const

Ifthenelse an image.

Optional parameters

- blend – Blend smoothly between then and else parts, bool.

Parameters

  in1 | Source for TRUE pixels.
  in2 | Source for FALSE pixels.
  options | Set of options.

Returns
  Output image.

## ifthenelse() [6/7]

VImage VImage::ifthenelse | ( | VImage | th,
|  | double | el,
|  | VOption * | options = nullptr ) const

inline

Use self as a conditional image (not zero meaning TRUE) to pick pixels from th (then) or el (else).

## ifthenelse() [7/7]

VImage VImage::ifthenelse | ( | VImage | th,
|  | std::vector< double > | el,
|  | VOption * | options = nullptr ) const

inline

Use self as a conditional image (not zero meaning TRUE) to pick pixels from th (then) or el (else).

## imag()

VImage VImage::imag | ( | VOption * | options = nullptr | ) | const

inline

Return the imaginary part of a complex image.

## inplace()

void VImage::inplace | ( |  | ) |

inline

Gets an VImage ready for an in-place operation, such as draw_circle(). After calling this function you can both read and write the image with VIPS_IMAGE_ADDR().

This method is called for you by the draw operations, there's no need to call it yourself.

Since this function modifies the image, it is not thread-safe. Only call it on images which you are sure have not been shared with another thread. All in-place operations are inherently not thread-safe, so you need to take great care in any case.

## insert()

VImage VImage::insert | ( | VImage | sub,
|  | int | x,
|  | int | y,
|  | VOption * | options = nullptr ) const

Insert image @sub into @main at @x, @y.

Optional parameters

- expand – Expand output to hold all of both inputs, bool.
- background – Color for new pixels, std::vector<double>.

Parameters

  sub | Sub-image to insert into main image.
  x | Left edge of sub in main.
  y | Top edge of sub in main.
  options | Set of options.

Returns
  Output image.

## interpretation()

VipsInterpretation VImage::interpretation | ( |  | ) | const

inline

Return the image interpretation, for example VIPS_INTERPRETATION_sRGB.

## invert()

VImage VImage::invert | ( | VOption * | options = nullptr | ) | const

Invert an image.

Parameters

  options | Set of options.

Returns
  Output image.

## invertlut()

VImage VImage::invertlut | ( | VOption * | options = nullptr | ) | const

Build an inverted look-up table.

Optional parameters

- size – LUT size to generate, int.

Parameters

  options | Set of options.

Returns
  Output image.

## invfft()

VImage VImage::invfft | ( | VOption * | options = nullptr | ) | const

Inverse fft.

Optional parameters

- real – Output only the real part of the transform, bool.

Parameters

  options | Set of options.

Returns
  Output image.

## is_null()

bool VObject::is_null | ( |  | ) | const

inline

TRUE if this is a null VObject.

## join()

VImage VImage::join | ( | VImage | in2,
|  | VipsDirection | direction,
|  | VOption * | options = nullptr ) const

Join a pair of images.

Optional parameters

- expand – Expand output to hold all of both inputs, bool.
- shim – Pixels between images, int.
- background – Colour for new pixels, std::vector<double>.
- align – Align on the low, centre or high coordinate edge, VipsAlign.

Parameters

  in2 | Second input image.
  direction | Join left-right or up-down.
  options | Set of options.

Returns
  Output image.

## jp2kload()

VImage VImage::jp2kload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load jpeg2000 image.

Optional parameters

- page – Load this page from the image, int.
- oneshot – Load images a frame at a time, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## jp2kload_buffer()

VImage VImage::jp2kload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load jpeg2000 image.

Optional parameters

- page – Load this page from the image, int.
- oneshot – Load images a frame at a time, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## jp2kload_source()

VImage VImage::jp2kload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load jpeg2000 image.

Optional parameters

- page – Load this page from the image, int.
- oneshot – Load images a frame at a time, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## jp2ksave()

void VImage::jp2ksave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image in jpeg2000 format.

Optional parameters

- tile_width – Tile width in pixels, int.
- tile_height – Tile height in pixels, int.
- lossless – Enable lossless compression, bool.
- Q – Q factor, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## jp2ksave_buffer()

VipsBlob * VImage::jp2ksave_buffer | ( | VOption * | options = nullptr | ) | const

Save image in jpeg2000 format.

Optional parameters

- tile_width – Tile width in pixels, int.
- tile_height – Tile height in pixels, int.
- lossless – Enable lossless compression, bool.
- Q – Q factor, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## jp2ksave_target()

void VImage::jp2ksave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image in jpeg2000 format.

Optional parameters

- tile_width – Tile width in pixels, int.
- tile_height – Tile height in pixels, int.
- lossless – Enable lossless compression, bool.
- Q – Q factor, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## jpegload()

VImage VImage::jpegload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load jpeg from file.

Optional parameters

- shrink – Shrink factor on load, int.
- autorotate – Rotate image using exif orientation, bool.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## jpegload_buffer()

VImage VImage::jpegload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load jpeg from buffer.

Optional parameters

- shrink – Shrink factor on load, int.
- autorotate – Rotate image using exif orientation, bool.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## jpegload_source()

VImage VImage::jpegload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load image from jpeg source.

Optional parameters

- shrink – Shrink factor on load, int.
- autorotate – Rotate image using exif orientation, bool.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## jpegsave()

void VImage::jpegsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save as jpeg.

Optional parameters

- Q – Q factor, int.
- optimize_coding – Compute optimal Huffman coding tables, bool.
- interlace – Generate an interlaced (progressive) jpeg, bool.
- trellis_quant – Apply trellis quantisation to each 8x8 block, bool.
- overshoot_deringing – Apply overshooting to samples with extreme values, bool.
- optimize_scans – Split spectrum of DCT coefficients into separate scans, bool.
- quant_table – Use predefined quantization table with given index, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- restart_interval – Add restart markers every specified number of mcu, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## jpegsave_buffer()

VipsBlob * VImage::jpegsave_buffer | ( | VOption * | options = nullptr | ) | const

Save as jpeg.

Optional parameters

- Q – Q factor, int.
- optimize_coding – Compute optimal Huffman coding tables, bool.
- interlace – Generate an interlaced (progressive) jpeg, bool.
- trellis_quant – Apply trellis quantisation to each 8x8 block, bool.
- overshoot_deringing – Apply overshooting to samples with extreme values, bool.
- optimize_scans – Split spectrum of DCT coefficients into separate scans, bool.
- quant_table – Use predefined quantization table with given index, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- restart_interval – Add restart markers every specified number of mcu, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## jpegsave_mime()

void VImage::jpegsave_mime | ( | VOption * | options = nullptr | ) | const

Save image to jpeg mime.

Optional parameters

- Q – Q factor, int.
- optimize_coding – Compute optimal Huffman coding tables, bool.
- interlace – Generate an interlaced (progressive) jpeg, bool.
- trellis_quant – Apply trellis quantisation to each 8x8 block, bool.
- overshoot_deringing – Apply overshooting to samples with extreme values, bool.
- optimize_scans – Split spectrum of DCT coefficients into separate scans, bool.
- quant_table – Use predefined quantization table with given index, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- restart_interval – Add restart markers every specified number of mcu, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

## jpegsave_target()

void VImage::jpegsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save as jpeg.

Optional parameters

- Q – Q factor, int.
- optimize_coding – Compute optimal Huffman coding tables, bool.
- interlace – Generate an interlaced (progressive) jpeg, bool.
- trellis_quant – Apply trellis quantisation to each 8x8 block, bool.
- overshoot_deringing – Apply overshooting to samples with extreme values, bool.
- optimize_scans – Split spectrum of DCT coefficients into separate scans, bool.
- quant_table – Use predefined quantization table with given index, int.
- subsample_mode – Select chroma subsample operation mode, VipsForeignSubsample.
- restart_interval – Add restart markers every specified number of mcu, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## jxlload()

VImage VImage::jxlload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load jpeg-xl image.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## jxlload_buffer()

VImage VImage::jxlload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load jpeg-xl image.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## jxlload_source()

VImage VImage::jxlload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load jpeg-xl image.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## jxlsave()

void VImage::jxlsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image in jpeg-xl format.

Optional parameters

- tier – Decode speed tier, int.
- distance – Target butteraugli distance, double.
- effort – Encoding effort, int.
- lossless – Enable lossless compression, bool.
- Q – Quality factor, int.
- bitdepth – Bit depth, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## jxlsave_buffer()

VipsBlob * VImage::jxlsave_buffer | ( | VOption * | options = nullptr | ) | const

Save image in jpeg-xl format.

Optional parameters

- tier – Decode speed tier, int.
- distance – Target butteraugli distance, double.
- effort – Encoding effort, int.
- lossless – Enable lossless compression, bool.
- Q – Quality factor, int.
- bitdepth – Bit depth, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## jxlsave_target()

void VImage::jxlsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image in jpeg-xl format.

Optional parameters

- tier – Decode speed tier, int.
- distance – Target butteraugli distance, double.
- effort – Encoding effort, int.
- lossless – Enable lossless compression, bool.
- Q – Quality factor, int.
- bitdepth – Bit depth, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## Lab2LabQ()

VImage VImage::Lab2LabQ | ( | VOption * | options = nullptr | ) | const

Transform float lab to labq coding.

Parameters

  options | Set of options.

Returns
  Output image.

## Lab2LabS()

VImage VImage::Lab2LabS | ( | VOption * | options = nullptr | ) | const

Transform float lab to signed short.

Parameters

  options | Set of options.

Returns
  Output image.

## Lab2LCh()

VImage VImage::Lab2LCh | ( | VOption * | options = nullptr | ) | const

Transform lab to lch.

Parameters

  options | Set of options.

Returns
  Output image.

## Lab2XYZ()

VImage VImage::Lab2XYZ | ( | VOption * | options = nullptr | ) | const

Transform cielab to xyz.

Optional parameters

- temp – Color temperature, std::vector<double>.

Parameters

  options | Set of options.

Returns
  Output image.

## labelregions()

VImage VImage::labelregions | ( | VOption * | options = nullptr | ) | const

Label regions in an image.

Parameters

  options | Set of options.

Returns
  Mask of region labels.

## LabQ2Lab()

VImage VImage::LabQ2Lab | ( | VOption * | options = nullptr | ) | const

Unpack a labq image to float lab.

Parameters

  options | Set of options.

Returns
  Output image.

## LabQ2LabS()

VImage VImage::LabQ2LabS | ( | VOption * | options = nullptr | ) | const

Unpack a labq image to short lab.

Parameters

  options | Set of options.

Returns
  Output image.

## LabQ2sRGB()

VImage VImage::LabQ2sRGB | ( | VOption * | options = nullptr | ) | const

Convert a labq image to srgb.

Parameters

  options | Set of options.

Returns
  Output image.

## LabS2Lab()

VImage VImage::LabS2Lab | ( | VOption * | options = nullptr | ) | const

Transform signed short lab to float.

Parameters

  options | Set of options.

Returns
  Output image.

## LabS2LabQ()

VImage VImage::LabS2LabQ | ( | VOption * | options = nullptr | ) | const

Transform short lab to labq coding.

Parameters

  options | Set of options.

Returns
  Output image.

## LCh2CMC()

VImage VImage::LCh2CMC | ( | VOption * | options = nullptr | ) | const

Transform lch to cmc.

Parameters

  options | Set of options.

Returns
  Output image.

## LCh2Lab()

VImage VImage::LCh2Lab | ( | VOption * | options = nullptr | ) | const

Transform lch to lab.

Parameters

  options | Set of options.

Returns
  Output image.

## linear() [1/4]

VImage VImage::linear | ( | double | a,
|  | double | b,
|  | VOption * | options = nullptr ) const

inline

Apply a linear transform to an image. For every pixel,

    out = in * a + b

## linear() [2/4]

VImage VImage::linear | ( | double | a,
|  | std::vector< double > | b,
|  | VOption * | options = nullptr ) const

inline

Apply a linear transform to an image. For every pixel,

    out = in * a + b

## linear() [3/4]

VImage VImage::linear | ( | std::vector< double > | a,
|  | double | b,
|  | VOption * | options = nullptr ) const

inline

Apply a linear transform to an image. For every pixel,

    out = in * a + b

## linear() [4/4]

VImage VImage::linear | ( | std::vector< double > | a,
|  | std::vector< double > | b,
|  | VOption * | options = nullptr ) const

Calculate (a * in + b).

Optional parameters

- uchar – Output should be uchar, bool.

Parameters

  a | Multiply by this.
  b | Add this.
  options | Set of options.

Returns
  Output image.

## linecache()

VImage VImage::linecache | ( | VOption * | options = nullptr | ) | const

Cache an image as a set of lines.

Optional parameters

- tile_height – Tile height in pixels, int.
- access – Expected access pattern, VipsAccess.
- threaded – Allow threaded access, bool.
- persistent – Keep cache between evaluations, bool.

Parameters

  options | Set of options.

Returns
  Output image.

## log()

VImage VImage::log | ( | VOption * | options = nullptr | ) | const

inline

Find the natural log of each pixel.

## log10()

VImage VImage::log10 | ( | VOption * | options = nullptr | ) | const

inline

Find the base 10 log of each pixel.

## logmat()

VImage VImage::logmat | ( | double | sigma,
|  | double | min_ampl,
|  | VOption * | options = nullptr )

static

Make a laplacian of gaussian image.

Optional parameters

- separable – Generate separable Gaussian, bool.
- precision – Generate with this precision, VipsPrecision.

Parameters

  sigma | Radius of Gaussian.
  min_ampl | Minimum amplitude of Gaussian.
  options | Set of options.

Returns
  Output image.

## magickload()

VImage VImage::magickload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load file with imagemagick.

Optional parameters

- density – Canvas resolution for rendering vector formats like SVG, const char *.
- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## magickload_buffer()

VImage VImage::magickload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load buffer with imagemagick.

Optional parameters

- density – Canvas resolution for rendering vector formats like SVG, const char *.
- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## magickload_source()

VImage VImage::magickload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load source with imagemagick.

Optional parameters

- density – Canvas resolution for rendering vector formats like SVG, const char *.
- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## magicksave()

void VImage::magicksave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save file with imagemagick.

Optional parameters

- format – Format to save in, const char *.
- quality – Quality to use, int.
- optimize_gif_frames – Apply GIF frames optimization, bool.
- optimize_gif_transparency – Apply GIF transparency optimization, bool.
- bitdepth – Number of bits per pixel, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## magicksave_buffer()

VipsBlob * VImage::magicksave_buffer | ( | VOption * | options = nullptr | ) | const

Save image to magick buffer.

Optional parameters

- format – Format to save in, const char *.
- quality – Quality to use, int.
- optimize_gif_frames – Apply GIF frames optimization, bool.
- optimize_gif_transparency – Apply GIF transparency optimization, bool.
- bitdepth – Number of bits per pixel, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## mapim()

VImage VImage::mapim | ( | VImage | index,
|  | VOption * | options = nullptr ) const

Resample with a map image.

Optional parameters

- interpolate – Interpolate pixels with this, VInterpolate.
- background – Background value, std::vector<double>.
- premultiplied – Images have premultiplied alpha, bool.
- extend – How to generate the extra pixels, VipsExtend.

Parameters

  index | Index pixels with this.
  options | Set of options.

Returns
  Output image.

## maplut()

VImage VImage::maplut | ( | VImage | lut,
|  | VOption * | options = nullptr ) const

Map an image though a lut.

Optional parameters

- band – Apply one-band lut to this band of in, int.

Parameters

  lut | Look-up table image.
  options | Set of options.

Returns
  Output image.

## mask_butterworth()

VImage VImage::mask_butterworth | ( | int | width,
|  | int | height,
|  | double | order,
|  | double | frequency_cutoff,
|  | double | amplitude_cutoff,
|  | VOption * | options = nullptr )

static

Make a butterworth filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  order | Filter order.
  frequency_cutoff | Frequency cutoff.
  amplitude_cutoff | Amplitude cutoff.
  options | Set of options.

Returns
  Output image.

## mask_butterworth_band()

VImage VImage::mask_butterworth_band | ( | int | width,
|  | int | height,
|  | double | order,
|  | double | frequency_cutoff_x,
|  | double | frequency_cutoff_y,
|  | double | radius,
|  | double | amplitude_cutoff,
|  | VOption * | options = nullptr )

static

Make a butterworth_band filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  order | Filter order.
  frequency_cutoff_x | Frequency cutoff x.
  frequency_cutoff_y | Frequency cutoff y.
  radius | Radius of circle.
  amplitude_cutoff | Amplitude cutoff.
  options | Set of options.

Returns
  Output image.

## mask_butterworth_ring()

VImage VImage::mask_butterworth_ring | ( | int | width,
|  | int | height,
|  | double | order,
|  | double | frequency_cutoff,
|  | double | amplitude_cutoff,
|  | double | ringwidth,
|  | VOption * | options = nullptr )

static

Make a butterworth ring filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  order | Filter order.
  frequency_cutoff | Frequency cutoff.
  amplitude_cutoff | Amplitude cutoff.
  ringwidth | Ringwidth.
  options | Set of options.

Returns
  Output image.

## mask_fractal()

VImage VImage::mask_fractal | ( | int | width,
|  | int | height,
|  | double | fractal_dimension,
|  | VOption * | options = nullptr )

static

Make fractal filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  fractal_dimension | Fractal dimension.
  options | Set of options.

Returns
  Output image.

## mask_gaussian()

VImage VImage::mask_gaussian | ( | int | width,
|  | int | height,
|  | double | frequency_cutoff,
|  | double | amplitude_cutoff,
|  | VOption * | options = nullptr )

static

Make a gaussian filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  frequency_cutoff | Frequency cutoff.
  amplitude_cutoff | Amplitude cutoff.
  options | Set of options.

Returns
  Output image.

## mask_gaussian_band()

VImage VImage::mask_gaussian_band | ( | int | width,
|  | int | height,
|  | double | frequency_cutoff_x,
|  | double | frequency_cutoff_y,
|  | double | radius,
|  | double | amplitude_cutoff,
|  | VOption * | options = nullptr )

static

Make a gaussian filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  frequency_cutoff_x | Frequency cutoff x.
  frequency_cutoff_y | Frequency cutoff y.
  radius | Radius of circle.
  amplitude_cutoff | Amplitude cutoff.
  options | Set of options.

Returns
  Output image.

## mask_gaussian_ring()

VImage VImage::mask_gaussian_ring | ( | int | width,
|  | int | height,
|  | double | frequency_cutoff,
|  | double | amplitude_cutoff,
|  | double | ringwidth,
|  | VOption * | options = nullptr )

static

Make a gaussian ring filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  frequency_cutoff | Frequency cutoff.
  amplitude_cutoff | Amplitude cutoff.
  ringwidth | Ringwidth.
  options | Set of options.

Returns
  Output image.

## mask_ideal()

VImage VImage::mask_ideal | ( | int | width,
|  | int | height,
|  | double | frequency_cutoff,
|  | VOption * | options = nullptr )

static

Make an ideal filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  frequency_cutoff | Frequency cutoff.
  options | Set of options.

Returns
  Output image.

## mask_ideal_band()

VImage VImage::mask_ideal_band | ( | int | width,
|  | int | height,
|  | double | frequency_cutoff_x,
|  | double | frequency_cutoff_y,
|  | double | radius,
|  | VOption * | options = nullptr )

static

Make an ideal band filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  frequency_cutoff_x | Frequency cutoff x.
  frequency_cutoff_y | Frequency cutoff y.
  radius | Radius of circle.
  options | Set of options.

Returns
  Output image.

## mask_ideal_ring()

VImage VImage::mask_ideal_ring | ( | int | width,
|  | int | height,
|  | double | frequency_cutoff,
|  | double | ringwidth,
|  | VOption * | options = nullptr )

static

Make an ideal ring filter.

Optional parameters

- uchar – Output an unsigned char image, bool.
- nodc – Remove DC component, bool.
- reject – Invert the sense of the filter, bool.
- optical – Rotate quadrants to optical space, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  frequency_cutoff | Frequency cutoff.
  ringwidth | Ringwidth.
  options | Set of options.

Returns
  Output image.

## match()

VImage VImage::match | ( | VImage | sec,
|  | int | xr1,
|  | int | yr1,
|  | int | xs1,
|  | int | ys1,
|  | int | xr2,
|  | int | yr2,
|  | int | xs2,
|  | int | ys2,
|  | VOption * | options = nullptr ) const

First-order match of two images.

Optional parameters

- hwindow – Half window size, int.
- harea – Half area size, int.
- search – Search to improve tie-points, bool.
- interpolate – Interpolate pixels with this, VInterpolate.

Parameters

  sec | Secondary image.
  xr1 | Position of first reference tie-point.
  yr1 | Position of first reference tie-point.
  xs1 | Position of first secondary tie-point.
  ys1 | Position of first secondary tie-point.
  xr2 | Position of second reference tie-point.
  yr2 | Position of second reference tie-point.
  xs2 | Position of second secondary tie-point.
  ys2 | Position of second secondary tie-point.
  options | Set of options.

Returns
  Output image.

## math()

VImage VImage::math | ( | VipsOperationMath | math,
|  | VOption * | options = nullptr ) const

Apply a math operation to an image.

Parameters

  math | Math to perform.
  options | Set of options.

Returns
  Output image.

## math2()

VImage VImage::math2 | ( | VImage | right,
|  | VipsOperationMath2 | math2,
|  | VOption * | options = nullptr ) const

Binary math operations.

Parameters

  right | Right-hand image argument.
  math2 | Math to perform.
  options | Set of options.

Returns
  Output image.

## math2_const()

VImage VImage::math2_const | ( | VipsOperationMath2 | math2,
|  | std::vector< double > | c,
|  | VOption * | options = nullptr ) const

Binary math operations with a constant.

Parameters

  math2 | Math to perform.
  c | Array of constants.
  options | Set of options.

Returns
  Output image.

## matload()

VImage VImage::matload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load mat from file.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## matrixinvert()

VImage VImage::matrixinvert | ( | VOption * | options = nullptr | ) | const

Invert a matrix.

Parameters

  options | Set of options.

Returns
  Output matrix.

## matrixload()

VImage VImage::matrixload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load matrix.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## matrixload_source()

VImage VImage::matrixload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load matrix.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## matrixmultiply()

VImage VImage::matrixmultiply | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Multiply two matrices.

Parameters

  right | Second matrix to multiply.
  options | Set of options.

Returns
  Output matrix.

## matrixprint()

void VImage::matrixprint | ( | VOption * | options = nullptr | ) | const

Print matrix.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

## matrixsave()

void VImage::matrixsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to matrix.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## matrixsave_target()

void VImage::matrixsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image to matrix.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## max()

double VImage::max | ( | VOption * | options = nullptr | ) | const

Find image maximum.

Optional parameters

- size – Number of maximum values to find, int.

Parameters

  options | Set of options.

Returns
  Output value.

## maxpair()

VImage VImage::maxpair | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Maximum of a pair of images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## maxpos()

std::complex< double > VImage::maxpos | ( | VOption * | options = nullptr | ) | const

Find the position of the image maximum as (x, y).

## measure()

VImage VImage::measure | ( | int | h,
|  | int | v,
|  | VOption * | options = nullptr ) const

Measure a set of patches on a color chart.

Optional parameters

- left – Left edge of extract area, int.
- top – Top edge of extract area, int.
- width – Width of extract area, int.
- height – Height of extract area, int.

Parameters

  h | Number of patches across chart.
  v | Number of patches down chart.
  options | Set of options.

Returns
  Output array of statistics.

## median()

VImage VImage::median | ( | int | size = 3,
|  | VOption * | options = nullptr ) const

inline

A median filter of the specified size. See VImage::rank().

## merge()

VImage VImage::merge | ( | VImage | sec,
|  | VipsDirection | direction,
|  | int | dx,
|  | int | dy,
|  | VOption * | options = nullptr ) const

Merge two images.

Optional parameters

- mblend – Maximum blend size, int.

Parameters

  sec | Secondary image.
  direction | Horizontal or vertical merge.
  dx | Horizontal displacement from sec to ref.
  dy | Vertical displacement from sec to ref.
  options | Set of options.

Returns
  Output image.

## min()

double VImage::min | ( | VOption * | options = nullptr | ) | const

Find image minimum.

Optional parameters

- size – Number of minimum values to find, int.

Parameters

  options | Set of options.

Returns
  Output value.

## minpair()

VImage VImage::minpair | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Minimum of a pair of images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## minpos()

std::complex< double > VImage::minpos | ( | VOption * | options = nullptr | ) | const

Find the position of the image minimum as (x, y).

## morph()

VImage VImage::morph | ( | VImage | mask,
|  | VipsOperationMorphology | morph,
|  | VOption * | options = nullptr ) const

Morphology operation.

Parameters

  mask | Input matrix image.
  morph | Morphological operation to perform.
  options | Set of options.

Returns
  Output image.

## mosaic()

VImage VImage::mosaic | ( | VImage | sec,
|  | VipsDirection | direction,
|  | int | xref,
|  | int | yref,
|  | int | xsec,
|  | int | ysec,
|  | VOption * | options = nullptr ) const

Mosaic two images.

Optional parameters

- hwindow – Half window size, int.
- harea – Half area size, int.
- mblend – Maximum blend size, int.
- bandno – Band to search for features on, int.

Parameters

  sec | Secondary image.
  direction | Horizontal or vertical mosaic.
  xref | Position of reference tie-point.
  yref | Position of reference tie-point.
  xsec | Position of secondary tie-point.
  ysec | Position of secondary tie-point.
  options | Set of options.

Returns
  Output image.

## mosaic1()

VImage VImage::mosaic1 | ( | VImage | sec,
|  | VipsDirection | direction,
|  | int | xr1,
|  | int | yr1,
|  | int | xs1,
|  | int | ys1,
|  | int | xr2,
|  | int | yr2,
|  | int | xs2,
|  | int | ys2,
|  | VOption * | options = nullptr ) const

First-order mosaic of two images.

Optional parameters

- hwindow – Half window size, int.
- harea – Half area size, int.
- search – Search to improve tie-points, bool.
- interpolate – Interpolate pixels with this, VInterpolate.
- mblend – Maximum blend size, int.

Parameters

  sec | Secondary image.
  direction | Horizontal or vertical mosaic.
  xr1 | Position of first reference tie-point.
  yr1 | Position of first reference tie-point.
  xs1 | Position of first secondary tie-point.
  ys1 | Position of first secondary tie-point.
  xr2 | Position of second reference tie-point.
  yr2 | Position of second reference tie-point.
  xs2 | Position of second secondary tie-point.
  ys2 | Position of second secondary tie-point.
  options | Set of options.

Returns
  Output image.

## msb()

VImage VImage::msb | ( | VOption * | options = nullptr | ) | const

Pick most-significant byte from an image.

Optional parameters

- band – Band to msb, int.

Parameters

  options | Set of options.

Returns
  Output image.

## multiply()

VImage VImage::multiply | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Multiply two images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## new_from_buffer() [1/2]

VImage VImage::new_from_buffer | ( | const std::string & | buf,
|  | const char * | option_string,
|  | VOption * | options = nullptr )

static

Create a new VImage object from an area of memory containing an image encoded in some format such as JPEG.

The available options depends on the image format. See for example VImage::jpegload().

## new_from_buffer() [2/2]

VImage VImage::new_from_buffer | ( | const void * | buf,
|  | size_t | len,
|  | const char * | option_string,
|  | VOption * | options = nullptr )

static

Create a new VImage object from an area of memory containing an image encoded in some format such as JPEG.

The available options depends on the image format. See for example VImage::jpegload().

## new_from_file()

VImage VImage::new_from_file | ( | const char * | name,
|  | VOption * | options = nullptr )

static

Create a new VImage object from a file on disc.

The available options depends on the image format. See for example VImage::jpegload().

## new_from_image() [1/2]

VImage VImage::new_from_image | ( | double | pixel | ) | const

inline

Make a new image of the same size and type as self, but with each pixel initialized with the constant.

## new_from_image() [2/2]

VImage VImage::new_from_image | ( | std::vector< double > | pixel | ) | const

inline

Make a new image of the same size and type as self, but with each pixel initialized with the constant.

## new_from_memory()

VImage VImage::new_from_memory | ( | const void * | data,
|  | size_t | size,
|  | int | width,
|  | int | height,
|  | int | bands,
|  | VipsBandFormat | format )

inline static

Create a new VImage object from an area of memory containing a C-style array.

## new_from_memory_copy()

VImage VImage::new_from_memory_copy | ( | const void * | data,
|  | size_t | size,
|  | int | width,
|  | int | height,
|  | int | bands,
|  | VipsBandFormat | format )

inline static

Create a new VImage object from an area of memory containing a C-style array. The VImage makes a copy of @data.

## new_from_memory_steal()

VImage VImage::new_from_memory_steal | ( | const void * | data,
|  | size_t | size,
|  | int | width,
|  | int | height,
|  | int | bands,
|  | VipsBandFormat | format )

static

Create a new VImage object from an area of memory containing a C-style array.

The VImage steals ownership of @data and will free() it when it goes out of scope.

## new_from_source()

VImage VImage::new_from_source | ( | VSource | source,
|  | const char * | option_string,
|  | VOption * | options = nullptr )

static

Create a new VImage object from a generic source object.

The available options depends on the image format. See for example VImage::jpegload().

## new_matrix() [1/2]

VImage VImage::new_matrix | ( | int | width,
|  | int | height )

static

Create a matrix image of a specified size. All elements will be zero.

## new_matrix() [2/2]

VImage VImage::new_matrix | ( | int | width,
|  | int | height,
|  | double * | array,
|  | int | size )

inline static

Create a matrix image of a specified size, initialized from the array.

## new_matrixv()

VImage VImage::new_matrixv | ( | int | width,
|  | int | height,
|  |  | ... )

static

Create a matrix image of a specified size, initialized from the function parameters.

## new_memory()

VImage VImage::new_memory | ( |  | ) |

inline static

Make a new image which, when written to, will create a large memory object. See VImage::write().

## new_temp_file()

VImage VImage::new_temp_file | ( | const char * | file_format = ".v" | ) |

inline static

Make a new VImage which, when written to, will create a temporary file on disc. See VImage::write().

## niftiload()

VImage VImage::niftiload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load nifti volume.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## niftiload_source()

VImage VImage::niftiload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load nifti volumes.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## niftisave()

void VImage::niftisave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to nifti file.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## Oklab2Oklch()

VImage VImage::Oklab2Oklch | ( | VOption * | options = nullptr | ) | const

Transform oklab to oklch.

Parameters

  options | Set of options.

Returns
  Output image.

## Oklab2XYZ()

VImage VImage::Oklab2XYZ | ( | VOption * | options = nullptr | ) | const

Transform oklab to xyz.

Parameters

  options | Set of options.

Returns
  Output image.

## Oklch2Oklab()

VImage VImage::Oklch2Oklab | ( | VOption * | options = nullptr | ) | const

Transform oklch to oklab.

Parameters

  options | Set of options.

Returns
  Output image.

## openexrload()

VImage VImage::openexrload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load an openexr image.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## openslideload()

VImage VImage::openslideload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load file with openslide.

Optional parameters

- level – Load this level from the file, int.
- autocrop – Crop to image bounds, bool.
- associated – Load this associated image, const char *.
- attach_associated – Attach all associated images, bool.
- rgb – Output RGB (not RGBA), bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## openslideload_source()

VImage VImage::openslideload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load source with openslide.

Optional parameters

- level – Load this level from the file, int.
- autocrop – Crop to image bounds, bool.
- associated – Load this associated image, const char *.
- attach_associated – Attach all associated images, bool.
- rgb – Output RGB (not RGBA), bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## option()

VOption * VImage::option | ( |  | ) |

inline static

Make a new VOption. Can save some typing.

## pdfload()

VImage VImage::pdfload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load pdf from file.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- dpi – DPI to render at, double.
- scale – Factor to scale by, double.
- background – Background colour, std::vector<double>.
- password – Password to decrypt with, const char *.
- page_box – The region of the page to render, VipsForeignPdfPageBox.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## pdfload_buffer()

VImage VImage::pdfload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load pdf from buffer.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- dpi – DPI to render at, double.
- scale – Factor to scale by, double.
- background – Background colour, std::vector<double>.
- password – Password to decrypt with, const char *.
- page_box – The region of the page to render, VipsForeignPdfPageBox.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## pdfload_source()

VImage VImage::pdfload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load pdf from source.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- dpi – DPI to render at, double.
- scale – Factor to scale by, double.
- background – Background colour, std::vector<double>.
- password – Password to decrypt with, const char *.
- page_box – The region of the page to render, VipsForeignPdfPageBox.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## percent()

int VImage::percent | ( | double | percent,
|  | VOption * | options = nullptr ) const

Find threshold for percent of pixels.

Parameters

  percent | Percent of pixels.
  options | Set of options.

Returns
  Threshold above which lie percent of pixels.

## perlin()

VImage VImage::perlin | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make a perlin noise image.

Optional parameters

- cell_size – Size of Perlin cells, int.
- uchar – Output an unsigned char image, bool.
- seed – Random number seed, int.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## phasecor()

VImage VImage::phasecor | ( | VImage | in2,
|  | VOption * | options = nullptr ) const

Calculate phase correlation.

Parameters

  in2 | Second input image.
  options | Set of options.

Returns
  Output image.

## pngload()

VImage VImage::pngload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load png from file.

Optional parameters

- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## pngload_buffer()

VImage VImage::pngload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load png from buffer.

Optional parameters

- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## pngload_source()

VImage VImage::pngload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load png from source.

Optional parameters

- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## pngsave()

void VImage::pngsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to file as png.

Optional parameters

- compression – Compression factor, int.
- interlace – Interlace image, bool.
- filter – libpng row filter flag(s), VipsForeignPngFilter.
- palette – Quantise to 8bpp palette, bool.
- Q – Quantisation quality, int.
- dither – Amount of dithering, double.
- bitdepth – Write as a 1, 2, 4, 8 or 16 bit image, int.
- effort – Quantisation CPU effort, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## pngsave_buffer()

VipsBlob * VImage::pngsave_buffer | ( | VOption * | options = nullptr | ) | const

Save image to buffer as png.

Optional parameters

- compression – Compression factor, int.
- interlace – Interlace image, bool.
- filter – libpng row filter flag(s), VipsForeignPngFilter.
- palette – Quantise to 8bpp palette, bool.
- Q – Quantisation quality, int.
- dither – Amount of dithering, double.
- bitdepth – Write as a 1, 2, 4, 8 or 16 bit image, int.
- effort – Quantisation CPU effort, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## pngsave_target()

void VImage::pngsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image to target as png.

Optional parameters

- compression – Compression factor, int.
- interlace – Interlace image, bool.
- filter – libpng row filter flag(s), VipsForeignPngFilter.
- palette – Quantise to 8bpp palette, bool.
- Q – Quantisation quality, int.
- dither – Amount of dithering, double.
- bitdepth – Write as a 1, 2, 4, 8 or 16 bit image, int.
- effort – Quantisation CPU effort, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## polar()

VImage VImage::polar | ( | VOption * | options = nullptr | ) | const

inline

Convert a complex image to polar coordinates.

## pow() [1/3]

VImage VImage::pow | ( | double | other,
|  | VOption * | options = nullptr ) const

inline

Raise each pixel to the specified power.

## pow() [2/3]

VImage VImage::pow | ( | std::vector< double > | other,
|  | VOption * | options = nullptr ) const

inline

Raise each pixel to the specified power.

## pow() [3/3]

VImage VImage::pow | ( | VImage | other,
|  | VOption * | options = nullptr ) const

inline

Raise each pixel to the specified power.

## ppmload()

VImage VImage::ppmload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load ppm from file.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## ppmload_buffer()

VImage VImage::ppmload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load ppm from buffer.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## ppmload_source()

VImage VImage::ppmload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load ppm from source.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## ppmsave()

void VImage::ppmsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to ppm file.

Optional parameters

- format – Format to save in, VipsForeignPpmFormat.
- ascii – Save as ascii, bool.
- bitdepth – Set to 1 to write as a 1 bit image, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## ppmsave_target()

void VImage::ppmsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save to ppm.

Optional parameters

- format – Format to save in, VipsForeignPpmFormat.
- ascii – Save as ascii, bool.
- bitdepth – Set to 1 to write as a 1 bit image, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## premultiply()

VImage VImage::premultiply | ( | VOption * | options = nullptr | ) | const

Premultiply image alpha.

Optional parameters

- max_alpha – Maximum value of alpha channel, double.

Parameters

  options | Set of options.

Returns
  Output image.

## prewitt()

VImage VImage::prewitt | ( | VOption * | options = nullptr | ) | const

Prewitt edge detector.

Parameters

  options | Set of options.

Returns
  Output image.

## profile()

VImage VImage::profile | ( | VImage * | rows,
|  | VOption * | options = nullptr ) const

Find image profiles.

Parameters

  rows | First non-zero pixel in row.
  options | Set of options.

Returns
  First non-zero pixel in column.

## profile_load()

VipsBlob * VImage::profile_load | ( | const char * | name,
|  | VOption * | options = nullptr )

static

Load named icc profile.

Parameters

  name | Profile name.
  options | Set of options.

Returns
  Loaded profile.

## project()

VImage VImage::project | ( | VImage * | rows,
|  | VOption * | options = nullptr ) const

Find image projections.

Parameters

  rows | Sums of rows.
  options | Set of options.

Returns
  Sums of columns.

## quadratic()

VImage VImage::quadratic | ( | VImage | coeff,
|  | VOption * | options = nullptr ) const

Resample an image with a quadratic transform.

Optional parameters

- interpolate – Interpolate values with this, VInterpolate.

Parameters

  coeff | Coefficient matrix.
  options | Set of options.

Returns
  Output image.

## rad2float()

VImage VImage::rad2float | ( | VOption * | options = nullptr | ) | const

Unpack radiance coding to float rgb.

Parameters

  options | Set of options.

Returns
  Output image.

## radload()

VImage VImage::radload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load a radiance image from a file.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## radload_buffer()

VImage VImage::radload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load rad from buffer.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## radload_source()

VImage VImage::radload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load rad from source.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## radsave()

void VImage::radsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to radiance file.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## radsave_buffer()

VipsBlob * VImage::radsave_buffer | ( | VOption * | options = nullptr | ) | const

Save image to radiance buffer.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## radsave_target()

void VImage::radsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image to radiance target.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## rank()

VImage VImage::rank | ( | int | width,
|  | int | height,
|  | int | index,
|  | VOption * | options = nullptr ) const

Rank filter.

Parameters

  width | Window width in pixels.
  height | Window height in pixels.
  index | Select pixel at index.
  options | Set of options.

Returns
  Output image.

## rawload()

VImage VImage::rawload | ( | const char * | filename,
|  | int | width,
|  | int | height,
|  | int | bands,
|  | VOption * | options = nullptr )

static

Load raw data from a file.

Optional parameters

- offset – Offset in bytes from start of file, guint64.
- format – Pixel format in image, VipsBandFormat.
- interpretation – Pixel interpretation, VipsInterpretation.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  width | Image width in pixels.
  height | Image height in pixels.
  bands | Number of bands in image.
  options | Set of options.

Returns
  Output image.

## rawsave()

void VImage::rawsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to raw file.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## rawsave_buffer()

VipsBlob * VImage::rawsave_buffer | ( | VOption * | options = nullptr | ) | const

Write raw image to buffer.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## rawsave_fd()

void VImage::rawsave_fd | ( | int | fd,
|  | VOption * | options = nullptr ) const

Write raw image to file descriptor.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  fd | File descriptor to write to.
  options | Set of options.

## rawsave_target()

void VImage::rawsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Write raw image to target.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## real()

VImage VImage::real | ( | VOption * | options = nullptr | ) | const

inline

Return the real part of a complex image.

## recomb()

VImage VImage::recomb | ( | VImage | m,
|  | VOption * | options = nullptr ) const

Linear recombination with matrix.

Parameters

  m | Matrix of coefficients.
  options | Set of options.

Returns
  Output image.

## rect()

VImage VImage::rect | ( | VOption * | options = nullptr | ) | const

inline

Convert a complex image to rectangular coordinates.

## reduce()

VImage VImage::reduce | ( | double | hshrink,
|  | double | vshrink,
|  | VOption * | options = nullptr ) const

Reduce an image.

Optional parameters

- kernel – Resampling kernel, VipsKernel.
- gap – Reducing gap, double.

Parameters

  hshrink | Horizontal shrink factor.
  vshrink | Vertical shrink factor.
  options | Set of options.

Returns
  Output image.

## reduceh()

VImage VImage::reduceh | ( | double | hshrink,
|  | VOption * | options = nullptr ) const

Shrink an image horizontally.

Optional parameters

- kernel – Resampling kernel, VipsKernel.
- gap – Reducing gap, double.

Parameters

  hshrink | Horizontal shrink factor.
  options | Set of options.

Returns
  Output image.

## reducev()

VImage VImage::reducev | ( | double | vshrink,
|  | VOption * | options = nullptr ) const

Shrink an image vertically.

Optional parameters

- kernel – Resampling kernel, VipsKernel.
- gap – Reducing gap, double.

Parameters

  vshrink | Vertical shrink factor.
  options | Set of options.

Returns
  Output image.

## region() [1/3]

VRegion VImage::region | ( |  | ) | const

Acquire an unprepared VRegion.

## region() [2/3]

VRegion VImage::region | ( | int | left,
|  | int | top,
|  | int | width,
|  | int | height ) const

Acquire VRegion covering the given coordinates.

## region() [3/3]

VRegion VImage::region | ( | VipsRect * | rect | ) | const

Acquire VRegion covering the given VipsRect.

## relational()

VImage VImage::relational | ( | VImage | right,
|  | VipsOperationRelational | relational,
|  | VOption * | options = nullptr ) const

Relational operation on two images.

Parameters

  right | Right-hand image argument.
  relational | Relational to perform.
  options | Set of options.

Returns
  Output image.

## relational_const()

VImage VImage::relational_const | ( | VipsOperationRelational | relational,
|  | std::vector< double > | c,
|  | VOption * | options = nullptr ) const

Relational operations against a constant.

Parameters

  relational | Relational to perform.
  c | Array of constants.
  options | Set of options.

Returns
  Output image.

## remainder()

VImage VImage::remainder | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Remainder after integer division of two images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## remainder_const()

VImage VImage::remainder_const | ( | std::vector< double > | c,
|  | VOption * | options = nullptr ) const

Remainder after integer division of an image and a constant.

Parameters

  c | Array of constants.
  options | Set of options.

Returns
  Output image.

## remosaic()

VImage VImage::remosaic | ( | const char * | old_str,
|  | const char * | new_str,
|  | VOption * | options = nullptr ) const

Rebuild an mosaiced image.

Parameters

  old_str | Search for this string.
  new_str | And swap for this string.
  options | Set of options.

Returns
  Output image.

## remove()

bool VImage::remove | ( | const char * | name | ) | const

inline

Remove a metadata item. This does nothing if the item does not exist.

## replicate()

VImage VImage::replicate | ( | int | across,
|  | int | down,
|  | VOption * | options = nullptr ) const

Replicate an image.

Parameters

  across | Repeat this many times horizontally.
  down | Repeat this many times vertically.
  options | Set of options.

Returns
  Output image.

## resize()

VImage VImage::resize | ( | double | scale,
|  | VOption * | options = nullptr ) const

Resize an image.

Optional parameters

- kernel – Resampling kernel, VipsKernel.
- gap – Reducing gap, double.
- vscale – Vertical scale image by this factor, double.

Parameters

  scale | Scale image by this factor.
  options | Set of options.

Returns
  Output image.

## rint()

VImage VImage::rint | ( | VOption * | options = nullptr | ) | const

inline

Convert to integer, rounding to nearest.

## rot()

VImage VImage::rot | ( | VipsAngle | angle,
|  | VOption * | options = nullptr ) const

Rotate an image.

Parameters

  angle | Angle to rotate image.
  options | Set of options.

Returns
  Output image.

## rot180()

VImage VImage::rot180 | ( | VOption * | options = nullptr | ) | const

inline

Rotate the image by 180 degrees.

## rot270()

VImage VImage::rot270 | ( | VOption * | options = nullptr | ) | const

inline

Rotate the image by 270 degrees clockwise.

## rot45()

VImage VImage::rot45 | ( | VOption * | options = nullptr | ) | const

Rotate an image.

Optional parameters

- angle – Angle to rotate image, VipsAngle45.

Parameters

  options | Set of options.

Returns
  Output image.

## rot90()

VImage VImage::rot90 | ( | VOption * | options = nullptr | ) | const

inline

Rotate the image by 90 degrees clockwise.

## rotate()

VImage VImage::rotate | ( | double | angle,
|  | VOption * | options = nullptr ) const

Rotate an image by a number of degrees.

Optional parameters

- interpolate – Interpolate pixels with this, VInterpolate.
- background – Background value, std::vector<double>.
- odx – Horizontal output displacement, double.
- ody – Vertical output displacement, double.
- idx – Horizontal input displacement, double.
- idy – Vertical input displacement, double.

Parameters

  angle | Rotate clockwise by this many degrees.
  options | Set of options.

Returns
  Output image.

## round()

VImage VImage::round | ( | VipsOperationRound | round,
|  | VOption * | options = nullptr ) const

Perform a round function on an image.

Parameters

  round | Rounding operation to perform.
  options | Set of options.

Returns
  Output image.

## scale()

VImage VImage::scale | ( | VOption * | options = nullptr | ) | const

Scale an image to uchar.

Optional parameters

- exp – Exponent for log scale, double.
- log – Log scale, bool.

Parameters

  options | Set of options.

Returns
  Output image.

## scharr()

VImage VImage::scharr | ( | VOption * | options = nullptr | ) | const

Scharr edge detector.

Parameters

  options | Set of options.

Returns
  Output image.

## scRGB2BW()

VImage VImage::scRGB2BW | ( | VOption * | options = nullptr | ) | const

Convert scrgb to bw.

Optional parameters

- depth – Output device space depth in bits, int.

Parameters

  options | Set of options.

Returns
  Output image.

## scRGB2sRGB()

VImage VImage::scRGB2sRGB | ( | VOption * | options = nullptr | ) | const

Convert scrgb to srgb.

Optional parameters

- depth – Output device space depth in bits, int.

Parameters

  options | Set of options.

Returns
  Output image.

## scRGB2XYZ()

VImage VImage::scRGB2XYZ | ( | VOption * | options = nullptr | ) | const

Transform scrgb to xyz.

Parameters

  options | Set of options.

Returns
  Output image.

## sdf()

VImage VImage::sdf | ( | int | width,
|  | int | height,
|  | VipsSdfShape | shape,
|  | VOption * | options = nullptr )

static

Create an sdf image.

Optional parameters

- r – Radius, double.
- a – Point a, std::vector<double>.
- b – Point b, std::vector<double>.
- corners – Corner radii, std::vector<double>.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  shape | SDF shape to create.
  options | Set of options.

Returns
  Output image.

## sequential()

VImage VImage::sequential | ( | VOption * | options = nullptr | ) | const

Check sequential access.

Optional parameters

- tile_height – Tile height in pixels, int.

Parameters

  options | Set of options.

Returns
  Output image.

## set() [1/9]

void VImage::set | ( | const char * | field,
|  | const char * | value )

inline

Set the value of a string metadata item on an image.

A copy of the string is taken.

## set() [2/9]

void VImage::set | ( | const char * | field,
|  | const VImage | value )

inline

Set the value of an image metadata item on an image.

## set() [3/9]

void VImage::set | ( | const char * | field,
|  | double * | value,
|  | int | n )

inline

Set the value of an double array metadata item on an image.

A copy of the array is taken.

## set() [4/9]

void VImage::set | ( | const char * | field,
|  | double | value )

inline

Set the value of a double metadata item on an image.

## set() [5/9]

void VImage::set | ( | const char * | field,
|  | int * | value,
|  | int | n )

inline

Set the value of an int array metadata item on an image.

A copy of the array is taken.

## set() [6/9]

void VImage::set | ( | const char * | field,
|  | int | value )

inline

Set the value of an int metadata item on an image.

## set() [7/9]

void VImage::set | ( | const char * | field,
|  | std::vector< double > | value )

inline

Set the value of an double array metadata item on an image.

A copy of the array is taken.

## set() [8/9]

void VImage::set | ( | const char * | field,
|  | std::vector< int > | value )

inline

Set the value of an int array metadata item on an image.

A copy of the array is taken.

## set() [9/9]

void VImage::set | ( | const char * | field,
|  | VipsCallbackFn | free_fn,
|  | void * | data,
|  | size_t | length )

inline

Set the value of a binary object metadata item on an image, such as an ICC profile.

When libvips no longer needs the value, it will be disposed with the free function. This can be NULL.

## sharpen()

VImage VImage::sharpen | ( | VOption * | options = nullptr | ) | const

Unsharp masking for print.

Optional parameters

- sigma – Sigma of Gaussian, double.
- x1 – Flat/jaggy threshold, double.
- y2 – Maximum brightening, double.
- y3 – Maximum darkening, double.
- m1 – Slope for flat areas, double.
- m2 – Slope for jaggy areas, double.

Parameters

  options | Set of options.

Returns
  Output image.

## shrink()

VImage VImage::shrink | ( | double | hshrink,
|  | double | vshrink,
|  | VOption * | options = nullptr ) const

Shrink an image.

Optional parameters

- ceil – Round-up output dimensions, bool.

Parameters

  hshrink | Horizontal shrink factor.
  vshrink | Vertical shrink factor.
  options | Set of options.

Returns
  Output image.

## shrinkh()

VImage VImage::shrinkh | ( | int | hshrink,
|  | VOption * | options = nullptr ) const

Shrink an image horizontally.

Optional parameters

- ceil – Round-up output dimensions, bool.

Parameters

  hshrink | Horizontal shrink factor.
  options | Set of options.

Returns
  Output image.

## shrinkv()

VImage VImage::shrinkv | ( | int | vshrink,
|  | VOption * | options = nullptr ) const

Shrink an image vertically.

Optional parameters

- ceil – Round-up output dimensions, bool.

Parameters

  vshrink | Vertical shrink factor.
  options | Set of options.

Returns
  Output image.

## sign()

VImage VImage::sign | ( | VOption * | options = nullptr | ) | const

Unit vector of pixel.

Parameters

  options | Set of options.

Returns
  Output image.

## similarity()

VImage VImage::similarity | ( | VOption * | options = nullptr | ) | const

Similarity transform of an image.

Optional parameters

- scale – Scale by this factor, double.
- angle – Rotate clockwise by this many degrees, double.
- interpolate – Interpolate pixels with this, VInterpolate.
- background – Background value, std::vector<double>.
- odx – Horizontal output displacement, double.
- ody – Vertical output displacement, double.
- idx – Horizontal input displacement, double.
- idy – Vertical input displacement, double.

Parameters

  options | Set of options.

Returns
  Output image.

## sin()

VImage VImage::sin | ( | VOption * | options = nullptr | ) | const

inline

Find the sine of each pixel. Angles are in degrees.

## sines()

VImage VImage::sines | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make a 2d sine wave.

Optional parameters

- uchar – Output an unsigned char image, bool.
- hfreq – Horizontal spatial frequency, double.
- vfreq – Vertical spatial frequency, double.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## sinh()

VImage VImage::sinh | ( | VOption * | options = nullptr | ) | const

inline

Find the hyperbolic sine of each pixel. Angles are in degrees.

## smartcrop()

VImage VImage::smartcrop | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Extract an area from an image.

Optional parameters

- interesting – How to measure interestingness, VipsInteresting.
- premultiplied – Input image already has premultiplied alpha, bool.

Parameters

  width | Width of extract area.
  height | Height of extract area.
  options | Set of options.

Returns
  Output image.

## sobel()

VImage VImage::sobel | ( | VOption * | options = nullptr | ) | const

Sobel edge detector.

Parameters

  options | Set of options.

Returns
  Output image.

## spcor()

VImage VImage::spcor | ( | VImage | ref,
|  | VOption * | options = nullptr ) const

Spatial correlation.

Parameters

  ref | Input reference image.
  options | Set of options.

Returns
  Output image.

## spectrum()

VImage VImage::spectrum | ( | VOption * | options = nullptr | ) | const

Make displayable power spectrum.

Parameters

  options | Set of options.

Returns
  Output image.

## sRGB2HSV()

VImage VImage::sRGB2HSV | ( | VOption * | options = nullptr | ) | const

Transform srgb to hsv.

Parameters

  options | Set of options.

Returns
  Output image.

## sRGB2scRGB()

VImage VImage::sRGB2scRGB | ( | VOption * | options = nullptr | ) | const

Convert an srgb image to scrgb.

Parameters

  options | Set of options.

Returns
  Output image.

## stats()

VImage VImage::stats | ( | VOption * | options = nullptr | ) | const

Find many image stats.

Parameters

  options | Set of options.

Returns
  Output array of statistics.

## stdif()

VImage VImage::stdif | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr ) const

Statistical difference.

Optional parameters

- s0 – New deviation, double.
- b – Weight of new deviation, double.
- m0 – New mean, double.
- a – Weight of new mean, double.

Parameters

  width | Window width in pixels.
  height | Window height in pixels.
  options | Set of options.

Returns
  Output image.

## subsample()

VImage VImage::subsample | ( | int | xfac,
|  | int | yfac,
|  | VOption * | options = nullptr ) const

Subsample an image.

Optional parameters

- point – Point sample, bool.

Parameters

  xfac | Horizontal subsample factor.
  yfac | Vertical subsample factor.
  options | Set of options.

Returns
  Output image.

## subtract()

VImage VImage::subtract | ( | VImage | right,
|  | VOption * | options = nullptr ) const

Subtract two images.

Parameters

  right | Right-hand image argument.
  options | Set of options.

Returns
  Output image.

## sum()

VImage VImage::sum | ( | std::vector< VImage > | in,
|  | VOption * | options = nullptr )

static

Sum an array of images.

Parameters

  in | Array of input images.
  options | Set of options.

Returns
  Output image.

## svgload()

VImage VImage::svgload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load svg with rsvg.

Optional parameters

- dpi – Render at this DPI, double.
- scale – Scale output by this factor, double.
- unlimited – Allow SVG of any size, bool.
- stylesheet – Custom CSS, const char *.
- high_bitdepth – Enable scRGB 128-bit output (32-bit per channel), bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## svgload_buffer()

VImage VImage::svgload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load svg with rsvg.

Optional parameters

- dpi – Render at this DPI, double.
- scale – Scale output by this factor, double.
- unlimited – Allow SVG of any size, bool.
- stylesheet – Custom CSS, const char *.
- high_bitdepth – Enable scRGB 128-bit output (32-bit per channel), bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## svgload_source()

VImage VImage::svgload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load svg from source.

Optional parameters

- dpi – Render at this DPI, double.
- scale – Scale output by this factor, double.
- unlimited – Allow SVG of any size, bool.
- stylesheet – Custom CSS, const char *.
- high_bitdepth – Enable scRGB 128-bit output (32-bit per channel), bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## switch_image()

VImage VImage::switch_image | ( | std::vector< VImage > | tests,
|  | VOption * | options = nullptr )

static

Find the index of the first non-zero pixel in tests.

Parameters

  tests | Table of images to test.
  options | Set of options.

Returns
  Output image.

## system()

void VImage::system | ( | const char * | cmd_format,
|  | VOption * | options = nullptr )

static

Run an external command.

Optional parameters

- in – Array of input images, std::vector<VImage>.
- in_format – Format for input filename, const char *.
- out_format – Format for output filename, const char *.
- cache – Cache this call, bool.

Parameters

  cmd_format | Command to run.
  options | Set of options.

## tan()

VImage VImage::tan | ( | VOption * | options = nullptr | ) | const

inline

Find the tangent of each pixel. Angles are in degrees.

## tanh()

VImage VImage::tanh | ( | VOption * | options = nullptr | ) | const

inline

Find the hyperbolic tangent of each pixel. Angles are in degrees.

## text()

VImage VImage::text | ( | const char * | text,
|  | VOption * | options = nullptr )

static

Make a text image.

Optional parameters

- font – Font to render with, const char *.
- width – Maximum image width in pixels, int.
- height – Maximum image height in pixels, int.
- align – Align on the low, centre or high edge, VipsAlign.
- justify – Justify lines, bool.
- dpi – DPI to render at, int.
- spacing – Line spacing, int.
- fontfile – Load this font file, const char *.
- rgba – Enable RGBA output, bool.
- wrap – Wrap lines on word or character boundaries, VipsTextWrap.

Parameters

  text | Text to render.
  options | Set of options.

Returns
  Output image.

## thumbnail()

VImage VImage::thumbnail | ( | const char * | filename,
|  | int | width,
|  | VOption * | options = nullptr )

static

Generate thumbnail from file.

Optional parameters

- height – Size to this height, int.
- size – Only upsize, only downsize, or both, VipsSize.
- no_rotate – Don't use orientation tags to rotate image upright, bool.
- crop – Reduce to fill target rectangle, then crop, VipsInteresting.
- linear – Reduce in linear light, bool.
- input_profile – Fallback input profile, const char *.
- output_profile – Fallback output profile, const char *.
- intent – Rendering intent, VipsIntent.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  filename | Filename to read from.
  width | Size to this width.
  options | Set of options.

Returns
  Output image.

## thumbnail_buffer() [1/2]

VImage VImage::thumbnail_buffer | ( | VipsBlob * | buffer,
|  | int | width,
|  | VOption * | options = nullptr )

static

Generate thumbnail from buffer.

Optional parameters

- option_string – Options that are passed on to the underlying loader, const char *.
- height – Size to this height, int.
- size – Only upsize, only downsize, or both, VipsSize.
- no_rotate – Don't use orientation tags to rotate image upright, bool.
- crop – Reduce to fill target rectangle, then crop, VipsInteresting.
- linear – Reduce in linear light, bool.
- input_profile – Fallback input profile, const char *.
- output_profile – Fallback output profile, const char *.
- intent – Rendering intent, VipsIntent.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  buffer | Buffer to load from.
  width | Size to this width.
  options | Set of options.

Returns
  Output image.

## thumbnail_buffer() [2/2]

VImage VImage::thumbnail_buffer | ( | void * | buf,
|  | size_t | len,
|  | int | width,
|  | VOption * | options = nullptr )

static

Generate thumbnail from buffer.

Optional parameters

- option_string – Options that are passed on to the underlying loader, const char *.
- height – Size to this height, int.
- size – Only upsize, only downsize, or both, VipsSize.
- no_rotate – Don't use orientation tags to rotate image upright, bool.
- crop – Reduce to fill target rectangle, then crop, VipsInteresting.
- linear – Reduce in linear light, bool.
- import_profile – Fallback import profile, const char *.
- export_profile – Fallback export profile, const char *.
- intent – Rendering intent, VipsIntent.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  buf | Buffer to load from.
  len | Size of buffer.
  width | Size to this width.
  options | Set of options.

Returns
  Output image.

## thumbnail_image()

VImage VImage::thumbnail_image | ( | int | width,
|  | VOption * | options = nullptr ) const

Generate thumbnail from image.

Optional parameters

- height – Size to this height, int.
- size – Only upsize, only downsize, or both, VipsSize.
- no_rotate – Don't use orientation tags to rotate image upright, bool.
- crop – Reduce to fill target rectangle, then crop, VipsInteresting.
- linear – Reduce in linear light, bool.
- input_profile – Fallback input profile, const char *.
- output_profile – Fallback output profile, const char *.
- intent – Rendering intent, VipsIntent.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  width | Size to this width.
  options | Set of options.

Returns
  Output image.

## thumbnail_source()

VImage VImage::thumbnail_source | ( | VSource | source,
|  | int | width,
|  | VOption * | options = nullptr )

static

Generate thumbnail from source.

Optional parameters

- option_string – Options that are passed on to the underlying loader, const char *.
- height – Size to this height, int.
- size – Only upsize, only downsize, or both, VipsSize.
- no_rotate – Don't use orientation tags to rotate image upright, bool.
- crop – Reduce to fill target rectangle, then crop, VipsInteresting.
- linear – Reduce in linear light, bool.
- input_profile – Fallback input profile, const char *.
- output_profile – Fallback output profile, const char *.
- intent – Rendering intent, VipsIntent.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  width | Size to this width.
  options | Set of options.

Returns
  Output image.

## tiffload()

VImage VImage::tiffload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load tiff from file.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- autorotate – Rotate image using orientation tag, bool.
- subifd – Subifd index, int.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## tiffload_buffer()

VImage VImage::tiffload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load tiff from buffer.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- autorotate – Rotate image using orientation tag, bool.
- subifd – Subifd index, int.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## tiffload_source()

VImage VImage::tiffload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load tiff from source.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- autorotate – Rotate image using orientation tag, bool.
- subifd – Subifd index, int.
- unlimited – Remove all denial of service limits, bool.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## tiffsave()

void VImage::tiffsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to tiff file.

Optional parameters

- compression – Compression for this file, VipsForeignTiffCompression.
- Q – Q factor, int.
- predictor – Compression prediction, VipsForeignTiffPredictor.
- tile – Write a tiled tiff, bool.
- tile_width – Tile width in pixels, int.
- tile_height – Tile height in pixels, int.
- pyramid – Write a pyramidal tiff, bool.
- miniswhite – Use 0 for white in 1-bit images, bool.
- bitdepth – Write as a 1, 2, 4 or 8 bit image, int.
- resunit – Resolution unit, VipsForeignTiffResunit.
- xres – Horizontal resolution in pixels/mm, double.
- yres – Vertical resolution in pixels/mm, double.
- bigtiff – Write a bigtiff image, bool.
- properties – Write a properties document to IMAGEDESCRIPTION, bool.
- region_shrink – Method to shrink regions, VipsRegionShrink.
- level – Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level, int.
- lossless – Enable WEBP lossless mode, bool.
- depth – Pyramid depth, VipsForeignDzDepth.
- subifd – Save pyr layers as sub-IFDs, bool.
- premultiply – Save with premultiplied alpha, bool.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## tiffsave_buffer()

VipsBlob * VImage::tiffsave_buffer | ( | VOption * | options = nullptr | ) | const

Save image to tiff buffer.

Optional parameters

- compression – Compression for this file, VipsForeignTiffCompression.
- Q – Q factor, int.
- predictor – Compression prediction, VipsForeignTiffPredictor.
- tile – Write a tiled tiff, bool.
- tile_width – Tile width in pixels, int.
- tile_height – Tile height in pixels, int.
- pyramid – Write a pyramidal tiff, bool.
- miniswhite – Use 0 for white in 1-bit images, bool.
- bitdepth – Write as a 1, 2, 4 or 8 bit image, int.
- resunit – Resolution unit, VipsForeignTiffResunit.
- xres – Horizontal resolution in pixels/mm, double.
- yres – Vertical resolution in pixels/mm, double.
- bigtiff – Write a bigtiff image, bool.
- properties – Write a properties document to IMAGEDESCRIPTION, bool.
- region_shrink – Method to shrink regions, VipsRegionShrink.
- level – Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level, int.
- lossless – Enable WEBP lossless mode, bool.
- depth – Pyramid depth, VipsForeignDzDepth.
- subifd – Save pyr layers as sub-IFDs, bool.
- premultiply – Save with premultiplied alpha, bool.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## tiffsave_target()

void VImage::tiffsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image to tiff target.

Optional parameters

- compression – Compression for this file, VipsForeignTiffCompression.
- Q – Q factor, int.
- predictor – Compression prediction, VipsForeignTiffPredictor.
- tile – Write a tiled tiff, bool.
- tile_width – Tile width in pixels, int.
- tile_height – Tile height in pixels, int.
- pyramid – Write a pyramidal tiff, bool.
- miniswhite – Use 0 for white in 1-bit images, bool.
- bitdepth – Write as a 1, 2, 4 or 8 bit image, int.
- resunit – Resolution unit, VipsForeignTiffResunit.
- xres – Horizontal resolution in pixels/mm, double.
- yres – Vertical resolution in pixels/mm, double.
- bigtiff – Write a bigtiff image, bool.
- properties – Write a properties document to IMAGEDESCRIPTION, bool.
- region_shrink – Method to shrink regions, VipsRegionShrink.
- level – Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level, int.
- lossless – Enable WEBP lossless mode, bool.
- depth – Pyramid depth, VipsForeignDzDepth.
- subifd – Save pyr layers as sub-IFDs, bool.
- premultiply – Save with premultiplied alpha, bool.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## tilecache()

VImage VImage::tilecache | ( | VOption * | options = nullptr | ) | const

Cache an image as a set of tiles.

Optional parameters

- tile_width – Tile width in pixels, int.
- tile_height – Tile height in pixels, int.
- max_tiles – Maximum number of tiles to cache, int.
- access – Expected access pattern, VipsAccess.
- threaded – Allow threaded access, bool.
- persistent – Keep cache between evaluations, bool.

Parameters

  options | Set of options.

Returns
  Output image.

## tonelut()

VImage VImage::tonelut | ( | VOption * | options = nullptr | ) |

static

Build a look-up table.

Optional parameters

- in_max – Size of LUT to build, int.
- out_max – Maximum value in output LUT, int.
- Lb – Lowest value in output, double.
- Lw – Highest value in output, double.
- Ps – Position of shadow, double.
- Pm – Position of mid-tones, double.
- Ph – Position of highlights, double.
- S – Adjust shadows by this much, double.
- M – Adjust mid-tones by this much, double.
- H – Adjust highlights by this much, double.

Parameters

  options | Set of options.

Returns
  Output image.

## transpose3d()

VImage VImage::transpose3d | ( | VOption * | options = nullptr | ) | const

Transpose3d an image.

Optional parameters

- page_height – Height of each input page, int.

Parameters

  options | Set of options.

Returns
  Output image.

## uhdr2scRGB()

VImage VImage::uhdr2scRGB | ( | VOption * | options = nullptr | ) | const

Transform uhdr to scrgb.

Parameters

  options | Set of options.

Returns
  Output image.

## uhdrload()

VImage VImage::uhdrload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load a uhdr image.

Optional parameters

- shrink – Shrink factor on load, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## uhdrload_buffer()

VImage VImage::uhdrload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load a uhdr image.

Optional parameters

- shrink – Shrink factor on load, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## uhdrload_source()

VImage VImage::uhdrload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load a uhdr image.

Optional parameters

- shrink – Shrink factor on load, int.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## uhdrsave()

void VImage::uhdrsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image in ultrahdr format.

Optional parameters

- Q – Q factor, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## uhdrsave_buffer()

VipsBlob * VImage::uhdrsave_buffer | ( | VOption * | options = nullptr | ) | const

Save image in ultrahdr format.

Optional parameters

- Q – Q factor, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## uhdrsave_target()

void VImage::uhdrsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image in ultrahdr format.

Optional parameters

- Q – Q factor, int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## unpremultiply()

VImage VImage::unpremultiply | ( | VOption * | options = nullptr | ) | const

Unpremultiply image alpha.

Optional parameters

- max_alpha – Maximum value of alpha channel, double.
- alpha_band – Unpremultiply with this alpha, int.

Parameters

  options | Set of options.

Returns
  Output image.

## vipsload()

VImage VImage::vipsload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load vips from file.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## vipsload_source()

VImage VImage::vipsload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load vips from source.

Optional parameters

- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## vipssave()

void VImage::vipssave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save image to file in vips format.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## vipssave_target()

void VImage::vipssave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save image to target in vips format.

Optional parameters

- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## webpload()

VImage VImage::webpload | ( | const char * | filename,
|  | VOption * | options = nullptr )

static

Load webp from file.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- scale – Factor to scale by, double.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  filename | Filename to load from.
  options | Set of options.

Returns
  Output image.

## webpload_buffer()

VImage VImage::webpload_buffer | ( | VipsBlob * | buffer,
|  | VOption * | options = nullptr )

static

Load webp from buffer.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- scale – Factor to scale by, double.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.
- revalidate – Don't use a cached result for this operation, bool.

Parameters

  buffer | Buffer to load from.
  options | Set of options.

Returns
  Output image.

## webpload_source()

VImage VImage::webpload_source | ( | VSource | source,
|  | VOption * | options = nullptr )

static

Load webp from source.

Optional parameters

- page – First page to load, int.
- n – Number of pages to load, -1 for all, int.
- scale – Factor to scale by, double.
- memory – Force open via memory, bool.
- access – Required access pattern for this file, VipsAccess.
- fail_on – Error level to fail on, VipsFailOn.

Parameters

  source | Source to load from.
  options | Set of options.

Returns
  Output image.

## webpsave()

void VImage::webpsave | ( | const char * | filename,
|  | VOption * | options = nullptr ) const

Save as webp.

Optional parameters

- Q – Q factor, int.
- lossless – Enable lossless compression, bool.
- exact – Preserve color values from transparent pixels, bool.
- preset – Preset for lossy compression, VipsForeignWebpPreset.
- smart_subsample – Enable high quality chroma subsampling, bool.
- near_lossless – Enable preprocessing in lossless mode (uses Q), bool.
- alpha_q – Change alpha plane fidelity for lossy compression, int.
- min_size – Optimise for minimum size, bool.
- kmin – Minimum number of frames between key frames, int.
- kmax – Maximum number of frames between key frames, int.
- effort – Level of CPU effort to reduce file size, int.
- target_size – Desired target size in bytes, int.
- mixed – Allow mixed encoding (might reduce file size), bool.
- smart_deblock – Enable auto-adjusting of the deblocking filter, bool.
- passes – Number of entropy-analysis passes (in [1..10]), int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  filename | Filename to save to.
  options | Set of options.

## webpsave_buffer()

VipsBlob * VImage::webpsave_buffer | ( | VOption * | options = nullptr | ) | const

Save as webp.

Optional parameters

- Q – Q factor, int.
- lossless – Enable lossless compression, bool.
- exact – Preserve color values from transparent pixels, bool.
- preset – Preset for lossy compression, VipsForeignWebpPreset.
- smart_subsample – Enable high quality chroma subsampling, bool.
- near_lossless – Enable preprocessing in lossless mode (uses Q), bool.
- alpha_q – Change alpha plane fidelity for lossy compression, int.
- min_size – Optimise for minimum size, bool.
- kmin – Minimum number of frames between key frames, int.
- kmax – Maximum number of frames between key frames, int.
- effort – Level of CPU effort to reduce file size, int.
- target_size – Desired target size in bytes, int.
- mixed – Allow mixed encoding (might reduce file size), bool.
- smart_deblock – Enable auto-adjusting of the deblocking filter, bool.
- passes – Number of entropy-analysis passes (in [1..10]), int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

Returns
  Buffer to save to.

## webpsave_mime()

void VImage::webpsave_mime | ( | VOption * | options = nullptr | ) | const

Save image to webp mime.

Optional parameters

- Q – Q factor, int.
- lossless – Enable lossless compression, bool.
- exact – Preserve color values from transparent pixels, bool.
- preset – Preset for lossy compression, VipsForeignWebpPreset.
- smart_subsample – Enable high quality chroma subsampling, bool.
- near_lossless – Enable preprocessing in lossless mode (uses Q), bool.
- alpha_q – Change alpha plane fidelity for lossy compression, int.
- min_size – Optimise for minimum size, bool.
- kmin – Minimum number of frames between key frames, int.
- kmax – Maximum number of frames between key frames, int.
- effort – Level of CPU effort to reduce file size, int.
- target_size – Desired target size in bytes, int.
- mixed – Allow mixed encoding (might reduce file size), bool.
- smart_deblock – Enable auto-adjusting of the deblocking filter, bool.
- passes – Number of entropy-analysis passes (in [1..10]), int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  options | Set of options.

## webpsave_target()

void VImage::webpsave_target | ( | VTarget | target,
|  | VOption * | options = nullptr ) const

Save as webp.

Optional parameters

- Q – Q factor, int.
- lossless – Enable lossless compression, bool.
- exact – Preserve color values from transparent pixels, bool.
- preset – Preset for lossy compression, VipsForeignWebpPreset.
- smart_subsample – Enable high quality chroma subsampling, bool.
- near_lossless – Enable preprocessing in lossless mode (uses Q), bool.
- alpha_q – Change alpha plane fidelity for lossy compression, int.
- min_size – Optimise for minimum size, bool.
- kmin – Minimum number of frames between key frames, int.
- kmax – Maximum number of frames between key frames, int.
- effort – Level of CPU effort to reduce file size, int.
- target_size – Desired target size in bytes, int.
- mixed – Allow mixed encoding (might reduce file size), bool.
- smart_deblock – Enable auto-adjusting of the deblocking filter, bool.
- passes – Number of entropy-analysis passes (in [1..10]), int.
- keep – Which metadata to retain, VipsForeignKeep.
- background – Background value, std::vector<double>.
- page_height – Set page height for multipage save, int.
- profile – Filename of ICC profile to embed, const char *.

Parameters

  target | Target to save to.
  options | Set of options.

## width()

int VImage::width | ( |  | ) | const

inline

Return the width of the image in pixels.

## wop() [1/3]

VImage VImage::wop | ( | double | other,
|  | VOption * | options = nullptr ) const

inline

Raise the constant to the power of each pixel (the opposite of pow).

## wop() [2/3]

VImage VImage::wop | ( | std::vector< double > | other,
|  | VOption * | options = nullptr ) const

inline

Raise the constant to the power of each pixel (the opposite of pow).

## wop() [3/3]

VImage VImage::wop | ( | VImage | other,
|  | VOption * | options = nullptr ) const

inline

Raise other to the power of each pixel (the opposite of pow).

## worley()

VImage VImage::worley | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make a worley noise image.

Optional parameters

- cell_size – Size of Worley cells, int.
- seed – Random number seed, int.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## wrap()

VImage VImage::wrap | ( | VOption * | options = nullptr | ) | const

Wrap image origin.

Optional parameters

- x – Left edge of input in output, int.
- y – Top edge of input in output, int.

Parameters

  options | Set of options.

Returns
  Output image.

## write()

VImage VImage::write | ( | VImage | out | ) | const

Write self to out. See VImage::new_memory() etc.

## write_to_buffer()

void VImage::write_to_buffer | ( | const char * | suffix,
|  | void ** | buf,
|  | size_t * | size,
|  | VOption * | options = nullptr ) const

Write an image to an area of memory in the specified format. You must free() the memory area once you are done with it.

For example:

    void *buf;
    size_t size;
    image.write_to_buffer(".jpg", &buf, &size);

The available options depends on the file format. See VImage::jpegsave(), for example.

## write_to_file()

void VImage::write_to_file | ( | const char * | name,
|  | VOption * | options = nullptr ) const

Write an image to a file.

The available options depends on the file format. See VImage::jpegsave(), for example.

## write_to_memory()

void * VImage::write_to_memory | ( | size_t * | size | ) | const

inline

Write an image to an area of memory as a C-style array.

## write_to_target()

void VImage::write_to_target | ( | const char * | suffix,
|  | VTarget | target,
|  | VOption * | options = nullptr ) const

Write an image to a generic target object in the specified format.

The available options depends on the file format. See VImage::jpegsave(), for example.

## xoffset()

int VImage::xoffset | ( |  | ) | const

inline

The horizontal offset of the origin in pixels.

## xres()

double VImage::xres | ( |  | ) | const

inline

The horizontal resolution in pixels per millimeter.

## xyz()

VImage VImage::xyz | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make an image where pixel values are coordinates.

Optional parameters

- csize – Size of third dimension, int.
- dsize – Size of fourth dimension, int.
- esize – Size of fifth dimension, int.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## XYZ2CMYK()

VImage VImage::XYZ2CMYK | ( | VOption * | options = nullptr | ) | const

Transform xyz to cmyk.

Parameters

  options | Set of options.

Returns
  Output image.

## XYZ2Lab()

VImage VImage::XYZ2Lab | ( | VOption * | options = nullptr | ) | const

Transform xyz to lab.

Optional parameters

- temp – Colour temperature, std::vector<double>.

Parameters

  options | Set of options.

Returns
  Output image.

## XYZ2Oklab()

VImage VImage::XYZ2Oklab | ( | VOption * | options = nullptr | ) | const

Transform xyz to oklab.

Parameters

  options | Set of options.

Returns
  Output image.

## XYZ2scRGB()

VImage VImage::XYZ2scRGB | ( | VOption * | options = nullptr | ) | const

Transform xyz to scrgb.

Parameters

  options | Set of options.

Returns
  Output image.

## XYZ2Yxy()

VImage VImage::XYZ2Yxy | ( | VOption * | options = nullptr | ) | const

Transform xyz to yxy.

Parameters

  options | Set of options.

Returns
  Output image.

## yoffset()

int VImage::yoffset | ( |  | ) | const

inline

The vertical offset of the origin in pixels.

## yres()

double VImage::yres | ( |  | ) | const

inline

The vertical resolution in pixels per millimeter.

## Yxy2XYZ()

VImage VImage::Yxy2XYZ | ( | VOption * | options = nullptr | ) | const

Transform yxy to xyz.

Parameters

  options | Set of options.

Returns
  Output image.

## zone()

VImage VImage::zone | ( | int | width,
|  | int | height,
|  | VOption * | options = nullptr )

static

Make a zone plate.

Optional parameters

- uchar – Output an unsigned char image, bool.

Parameters

  width | Image width in pixels.
  height | Image height in pixels.
  options | Set of options.

Returns
  Output image.

## zoom()

VImage VImage::zoom | ( | int | xfac,
|  | int | yfac,
|  | VOption * | options = nullptr ) const

Zoom an image.

Parameters

  xfac | Horizontal zoom factor.
  yfac | Vertical zoom factor.
  options | Set of options.

Returns
  Output image.

The documentation for this class was generated from the following files:

- /build/vips-Wqox7w/vips-8.18.4/cplusplus/include/vips/VImage8.h
- /build/vips-Wqox7w/vips-8.18.4/cplusplus/VImage.cpp
- /build/vips-Wqox7w/vips-8.18.4/cplusplus/vips-operators.cpp