Vips – 8.0
Description: Reference for Vips-8.0

### Namespace

# Vips – 8.0

The libvips image processing library

Version | 8.18
Authors | libvips team and contributors
License | LGPL-2.1-or-later
Website | https://www.libvips.org
Source | https://github.com/libvips/libvips

#### Build

C headers | `vips/vips.h`
pkg-config files | `vips`

#### Dependencies

GObject—2.0 | The base type system library
| Browse documentation

#### Related libraries

GObject | The base type system library
| Browse documentation

#### Additional documentation

- Using > At the command-line
- Using > C
- Using > C++
- Using > Building image pyramids
- Using > Multipage and animated images
- Using > Processing UltraHDR images
- Using > vipsthumbnail
- Using > Threads
- Using > Checklist for programmers using libvips
- Using > Python examples
- Operator index / Alphabetical
- Operator index > By section > Basic
- Operator index > By section > Memory
- Operator index > By section > Error
- Operator index > By section > Initialisation
- Operator index > By section > Arithmetic
- Operator index > By section > Colour
- Operator index > By section > Conversion
- Operator index > By section > Convolution
- Operator index > By section > Create
- Operator index > By section > Draw
- Operator index > By section > Fourier
- Operator index > By section > Generate
- Operator index > By section > Header
- Operator index > By section > Histogram
- Operator index > By section > Morphology
- Operator index > By section > Mosaicing
- Operator index > By section > Resample
- Technical background > Evaluation
- Technical background > Opening files
- Technical background > The libvips file format
- Advanced > Writing operators
- Advanced > Writing bindings
- Citing libvips
- Classes Hierarchy

#### Classes

Connection | An abstract base class representing a source or sink of bytes.
Foreign | An abstract base class to load and save images in a variety of formats.
ForeignLoad | An abstract base class to load images in a variety of formats.
ForeignSave | An abstract base class to save images in a variety of formats.
GInputStream |
Image | The `VipsImage` class and associated types and macros.
Interpolate | An abstract base class for the various interpolation functions.
Object | An abstract base class for all objects in libvips.
Operation | An abstract base class for all operations in libvips.
Region | A `VipsRegion` represents a small, rectangular part of an image.
Sbuf | A `VipsSbuf` provides a buffered reading interface for a `VipsSource`.
Source | A `VipsSource` provides a unified interface for reading, seeking, and mapping data, regardless of the underlying source type.
SourceCustom | Subclass of `VipsSource` with action signals for handlers.
SourceGInputStream |
Target | A `VipsTarget` provides a unified interface for writing data to various output destinations.
TargetCustom | Subclass of `VipsTarget` with action signals for handlers.
ThreadState | A `VipsThreadState` represents a per-thread state.

#### Structs

Area |
Argument | Libvips has a simple mechanism for automating at least some aspects of `GObject` properties. You add a set of macros to your `_class_init()` which describe the arguments, and set the get and set functions to the libvips ones.
ArgumentClass |
ArgumentInstance |
ArrayDouble |
ArrayImage |
ArrayInt |
Blob |
Buf | A message buffer you can append stuff to safely and quickly. If the message gets too long, you get “…” and truncation. Message buffers can be on the stack or heap.
Dbuf |
Progress | A structure available to eval callbacks giving information on evaluation progress. See `VipsImage::eval`.
Rect | A `VipsRect` is a rectangular area of pixels. This is a struct for performing simple rectangle algebra.
RefString |
SaveString |
Semaphore |

#### Aliases

ArgumentTable |
Pel | A picture element. Cast this to whatever the associated VipsBandFormat says to get the value.

#### Enumerations

Access | The type of access an operation has to supply. See `vips_tilecache()` and `VipsForeign`.
Align | See `vips_join()` and so on.
Angle | See `vips_rot()` and so on.
Angle45 | See `vips_rot45()` and so on.
BandFormat | The format used for each band element.
BlendMode | The various Porter-Duff and PDF blend modes. See `vips_composite()`, for example.
Coding | How pixels are coded.
Combine | How to combine values. See `vips_compass()`, for example.
CombineMode | See `vips_draw_image()` and so on.
CompassDirection | A direction on a compass. Used for `vips_gravity()`, for example.
DemandStyle | See `vips_image_pipelinev()`. Operations can hint the kind of demand geometry they prefer to the VIPS image IO system.
Direction | See `vips_flip()`, `vips_join()` and so on.
Extend | See `vips_embed()`, `vips_conv()`, `vips_affine()` and so on.
FailOn | How sensitive loaders are to errors, from never stop (very insensitive), to stop on the smallest warning (very sensitive).
ForeignDzContainer | What container format to use.
ForeignDzDepth | How many pyramid layers to create.
ForeignDzLayout | What directory layout and metadata standard to use.
ForeignHeifCompression | The compression format to use inside a HEIF container.
ForeignHeifEncoder | The selected encoder to use. If libheif hasn’t been compiled with the selected encoder, we will fallback to the default encoder for the compression format.
ForeignJpegSubsample |
ForeignPdfPageBox | Each page of a PDF document can contain multiple page boxes, also known as boundary boxes or print marks.
ForeignPpmFormat | The netpbm file format to save as.
ForeignSubsample | Set subsampling mode.
ForeignTiffCompression | The compression types supported by the tiff writer.
ForeignTiffPredictor | The predictor can help deflate and lzw compression. The values are fixed by the tiff library.
ForeignTiffResunit | Use inches or centimeters as the resolution unit for a tiff file.
ForeignWebpPreset | Tune lossy encoder settings for different image types.
ImageType |
Intent | The rendering intent. `VIPS_INTENT_ABSOLUTE` is best for scientific work, `VIPS_INTENT_RELATIVE` is usually best for accurate communication with other imaging libraries.
Interesting | Pick the algorithm vips uses to decide image “interestingness”. This is used by `vips_smartcrop()`, for example, to decide what parts of the image to keep.
Interpretation | How the values in an image should be interpreted. For example, a three-band float image of type `VIPS_INTERPRETATION_LAB` should have its pixels interpreted as coordinates in CIE Lab space.
Kernel | The resampling kernels vips supports. See `vips_reduce()`, for example.
OperationBoolean | See also: `vips_boolean()`.
OperationComplex | See also: `vips_complex()`.
OperationComplex2 | See also: `vips_complex2()`.
OperationComplexget | See also: `vips_complexget()`.
OperationMath | See also: `vips_math()`.
OperationMath2 | See also: `vips_math()`.
OperationMorphology | More like hit-miss, really.
OperationRelational | See also: `vips_relational()`.
OperationRound | See also: `vips_round()`.
PCS | Pick a Profile Connection Space for `vips_icc_import()` and `vips_icc_export()`. LAB is usually best, XYZ can be more convenient in some cases.
Precision | How accurate an operation should be.
RegionShrink | How to calculate the output pixels when shrinking a 2x2 region.
SdfShape | The SDF to generate,.
Size | Controls whether an operation should upsize, downsize, both up and downsize, or force a size.
TextWrap | Sets the word wrapping style for `vips_text()` when used with a maximum width.

#### Bitfields

ArgumentFlags | Flags we associate with each object argument.
ForeignCoding | The set of coding types supported by a saver.
ForeignFlags | Some hints about the image loader.
ForeignKeep | Which metadata to retain.
ForeignPngFilter | The values mirror those of png.h in libpng.
ForeignSaveable | The set of image types supported by a saver.
OperationFlags | Flags we associate with an operation.

#### Callbacks

ArgumentClassMapFn |
ArgumentMapFn |
CallbackFn |
ClassMapFn |
GenerateFn | Fill `out`->valid with pixels. `seq` contains per-thread state, such as the input regions. Set `stop` to `TRUE` to stop processing.
ImageMapFn |
InterpolateMethod | An interpolation function. It should read source pixels from `in` with `VIPS_REGION_ADDR()`, it can look left and up from (x, y) by `window_offset` pixels and it can access pixels in a window of size `window_size`.
ObjectSetArguments |
OperationBuildFn |
RegionWrite | The function should write the pixels in `area` from `region`. `a` is the value passed into `vips_sink_disc()`.
SinkNotify |
SListFold2Fn |
SListMap2Fn |
SListMap4Fn |
StartFn | Start a new processing sequence for this generate function. This allocates per-thread state, such as an input region.
StopFn | Stop a processing sequence. This frees per-thread state, such as an input region.
ThreadpoolAllocateFn | This function is called to allocate a new work unit for the thread. It is always single-threaded, so it can modify per-pool state (such as a counter).
ThreadpoolProgressFn | This function is called by the main thread once for every work unit processed. It can be used to give the user progress feedback.
ThreadpoolWorkFn | This function is called to process a work unit. Many copies of this can run at once, so it should not write to the per-pool state. It can write to per-thread state.
ThreadStartFn |
TypeMap2Fn |
TypeMapFn |

#### Functions

add_option_entries | Add the standard vips `GOptionEntry` to a `GOptionGroup`.
allocate_input_array | Convenience function — make a `NULL`-terminated array of input images. Use with `vips_start_many()`.
amiMSBfirst |
block_untrusted_set | Set the block state on all untrusted operations.
break_token |
cache_drop_all | Drop the whole operation cache, handy for leak tracking. Also called automatically on `vips_shutdown()`.
cache_get_max | Get the maximum number of operations we keep in cache.
cache_get_max_files | Get the maximum number of tracked files we allow before we start dropping cached operations. See `vips_tracked_get_files()`.
cache_get_max_mem | Get the maximum amount of tracked memory we allow before we start dropping cached operations. See `vips_tracked_get_mem()`.
cache_get_size | Get the current number of operations in cache.
cache_operation_build | A binding-friendly version of `vips_cache_operation_buildp()`.
cache_operation_buildp | Look up `operation` in the cache. If we get a hit, unref `operation`, ref the old one and return that through the argument pointer.
cache_print | Print the whole operation cache to stdout. Handy for debugging.
cache_set_dump | Handy for debugging. Print the operation cache to stdout just before exit.
cache_set_max | Set the maximum number of operations we keep in cache.
cache_set_max_files | Set the maximum number of tracked files we allow before we start dropping cached operations. See `vips_tracked_get_files()`.
cache_set_max_mem | Set the maximum amount of tracked memory we allow before we start dropping cached operations. See `vips_tracked_get_mem()`.
cache_set_trace | Handy for debugging. Print operation cache actions to stdout as we run.
call | `vips_call()` calls the named operation, passing in required arguments and then setting any optional ones from the remainder of the arguments as a set of name/value pairs.
call_argv |
call_options |
call_required_optional | This is the main entry point for the C and C++ varargs APIs. `operation` is executed, supplying `required` and `optional` arguments.
call_split |
call_split_option_string |
check_8or16 | Check that the image is 8 or 16-bit integer, signed or unsigned. Otherwise set an error message and return non-zero.
check_bandno | `bandno` should be a valid band number (ie. 0 to im->Bands - 1), or can be -1, meaning all bands. If not, set an error message and return non-zero.
check_bands | Check that the image has `bands` bands. Otherwise set an error message and return non-zero.
check_bands_1or3 | Check that the image has either one or three bands. Otherwise set an error message and return non-zero.
check_bands_1orn | Check that the images have the same number of bands, or that one of the images has just 1 band. If not, set an error message and return non-zero.
check_bands_1orn_unary | Check that an image has 1 or `n` bands. Handy for unary operations, cf. `vips_check_bands_1orn()`. If not, set an error message and return non-zero.
check_bands_atleast | Check that the image has at least `bands` bands. Otherwise set an error message and return non-zero.
check_bands_same | Check that the images have the same number of bands. If not, set an error message and return non-zero.
check_coding | Check that the image has the required `coding`. If not, set an error message and return non-zero.
check_coding_known | Check that the image is uncoded, LABQ coded or RAD coded. If not, set an error message and return non-zero.
check_coding_noneorlabq | Check that the image is uncoded or LABQ coded. If not, set an error message and return non-zero.
check_coding_same | Check that the images have the same coding. If not, set an error message and return non-zero.
check_complex | Check that the image is complex. Otherwise set an error message and return non-zero.
check_format | Check that the image has the specified format. Otherwise set an error message and return non-zero.
check_format_same | Check that the images have the same format. If not, set an error message and return non-zero.
check_hist | Histogram images must have width or height 1, and must not have more than 65536 elements. Return 0 if the image will pass as a histogram, or -1 and set an error message otherwise.
check_int | Check that the image is in one of the integer formats. Otherwise set an error message and return non-zero.
check_matrix | Matrix images must have width and height less than 100000 and have 1 band.
check_mono | Check that the image has exactly one band. Otherwise set an error message and return non-zero.
check_noncomplex | Check that the image is not complex. Otherwise set an error message and return non-zero.
check_oddsquare | Check that the image is square and that the sides are odd. If not, set an error message and return non-zero.
check_precision_intfloat | Check that `prec` image is either float or int. If not, set an error message and return non-zero.
check_separable | Separable matrix images must have width or height 1. Return 0 if the image will pass, or -1 and set an error message otherwise.
check_size_same | Check that the images have the same size. If not, set an error message and return non-zero.
check_twocomponents | Check that the image is has two “components”, ie. is a one-band complex or a two-band non-complex. Otherwise set an error message and return non-zero.
check_u8or16 | Check that the image is 8 or 16-bit unsigned integer. Otherwise set an error message and return non-zero.
check_u8or16orf | Check that the image is 8 or 16-bit unsigned integer, or float. Otherwise set an error message and return non-zero.
check_uint | Check that the image is in one of the unsigned integer formats. Otherwise set an error message and return non-zero.
check_uintorf | Check that the image is unsigned int or float. Otherwise set an error message and return non-zero.
check_uncoded | Check that the image is not coded. If not, set an error message and return non-zero.
check_vector | Operations with a vector constant need a 1-element vector, or a vector with the same number of elements as there are bands in the image, or a 1-band image and a many-element vector.
check_vector_length | Check that `n` == `len`.
class_find | Search below `basename`, return the first class whose name or `nickname` matches.
class_map_all | Loop over all the subclasses of `type`. Non-abstract classes only. Stop when `fn` returns non-`NULL` and return that value.
col_ab2Ch |
col_ab2h |
col_C2Ccmc | Calculate Ccmc from C.
col_Ccmc2C | Calculate C from Ccmc using a table. Call `vips_col_make_tables_CMC()` at least once before using this function.
col_Ch2ab | Calculate ab from Ch, h in degrees.
col_Ch2hcmc | Calculate hcmc from C and h.
col_Chcmc2h | Calculate h from C and hcmc, using a table. Call `vips_col_make_tables_CMC()` at least once before using this function.
col_dE00 | CIEDE2000, from:.
col_L2Lcmc | Calculate Lcmc from L.
col_Lab2XYZ | Calculate XYZ from Lab, D65.
col_Lcmc2L | Calculate L from Lcmc using a table. Call `vips_col_make_tables_CMC()` at least once before using this function.
col_make_tables_CMC | Make the lookup tables for cmc.
col_scRGB2BW_16 |
col_scRGB2BW_8 |
col_scRGB2sRGB_16 |
col_scRGB2sRGB_8 |
col_scRGB2XYZ | Turn scRGB into XYZ.
col_sRGB2scRGB_16 |
col_sRGB2scRGB_16_noclip |
col_sRGB2scRGB_8 |
col_sRGB2scRGB_8_noclip |
col_XYZ2Lab | Calculate XYZ from Lab, D65.
col_XYZ2scRGB | Turn XYZ into scRGB.
concurrency_get | Returns the number of worker threads that vips should use when running `vips_threadpool_run()`.
concurrency_set | Sets the number of worker threads that vips should use when running `vips_threadpool_run()`.
enum_from_nick |
enum_nick |
enum_string |
error | Format the string in the style of `printf()` and append to the error buffer.
error_buffer | Get a pointer to the start of the error buffer as a C string. The string is owned by the error system and must not be freed.
error_buffer_copy | Return a copy of the vips error buffer, and clear it.
error_clear | Clear and reset the error buffer. This is typically called after presenting an error to the user.
error_exit | Sends a formatted error message to stderr, then sends the contents of the error buffer, if any, then shuts down vips and terminates the program with an error code.
error_freeze | Stop errors being logged. Use `vips_error_thaw()` to unfreeze. You can nest freeze/thaw pairs.
error_g | This function sets the glib error pointer from the vips error buffer and clears it. It’s handy for returning errors to glib functions from vips.
error_system | Format the string in the style of `printf()` and append to the error buffer. Then create and append a localised message based on the system error code, usually the value of errno.
error_thaw | Re-enable error logging.
existsf |
file_length |
filename_get_filename | Given a vips filename like “fred.jpg[Q=90]”, return a new string of just the filename part, “fred.jpg” in this case.
filename_get_options | Given a vips filename like “fred.jpg[Q=90]”, return a new string of just the options part, “[Q=90]” in this case.
filename_suffix_match |
flags_from_nick |
foreign_flags | Return the flags for `filename` using `loader`. `loader` is something like “tiffload” or “VipsForeignLoadTiff”.
format_sizeof |
format_sizeof_unsafe | A fast but dangerous version of `vips_format_sizeof()`. You must have previously range-checked `format` or you’ll crash.
g_error | This function adds the `GError` to the vips error buffer and clears it. It’s the opposite of `vips_error_g()`.
g_thread_new | Wrapper for `g_thread_try_new()`.
get_argv0 | See also `VIPS_INIT()`.
get_disc_threshold | Return the number of bytes at which we flip between open via memory and open via disc. This defaults to 100mb, but can be changed with the `VIPS_DISC_THRESHOLD` environment variable or the `--vips-disc-threshold` command-line flag. See `vips_image_new_from_file()`.
get_prgname | Return the program name.
guess_libdir | `vips_guess_libdir()` tries to guess the install directory (usually the configure libdir, or $prefix/lib). You should pass in the value of argv[0] (the name your program was run as) as a clue to help it out, plus the name of the environment variable you let the user override your package install area with (eg. “VIPSHOME”).
guess_prefix | `vips_guess_prefix()` tries to guess the install directory. You should pass in the value of argv[0] (the name your program was run as) as a clue to help it out, plus the name of the environment variable you let the user override your package install area with (eg. “VIPSHOME”).
hash_table_map | Like slist map, but for a hash table.
icc_is_compatible_profile |
icc_present | VIPS can optionally be built without the ICC library. Use this function to test for its availability.
init | This function starts up libvips, see `VIPS_INIT()`.
interpolate | Look up the `interpolate` method in the class and call it. Use `vips_interpolate_get_method()` to get a direct pointer to the function and avoid the lookup overhead.
iscasepostfix |
isdirf |
ispoweroftwo |
isprefix |
leak_set | Turn on or off vips leak checking. See also `--vips-leak`, `vips_add_option_entries()` and the `VIPS_LEAK` environment variable.
malloc | `g_malloc()` local to `object`, that is, the memory will be automatically freed for you when the object is closed. If `object` is `NULL`, you need to free the memory explicitly with `g_free()`.
map_equal |
max_coord_get | Return the maximum coordinate value. This can be the default, a value set set by the `--vips-max-coord` CLI arg, or a value set in the `VIPS_MAX_COORD` environment variable.
mkdirf |
nickname_find | Return the VIPS nickname for a `GType`. Handy for language bindings.
pipe_read_limit_set | If a source does not support mmap or seek and the source is used with a loader that can only work from memory, then the data will be automatically read into memory to EOF before the loader starts. This can produce high memory use if the descriptor represents a large object.
profile_set | If set, vips will record profiling information, and dump it on program exit. These profiles can be analysed with the `vipsprofile` program.
pythagoras | Pythagorean distance between two points in colour space. Lab/XYZ/CMC etc.
realpath |
rename |
rmdirf |
shutdown | Call this to drop caches, close plugins, terminate background threads, and finalize any internal library testing.
sink_memory | Loops over `im`, generating it to a memory buffer attached to `im`. It is used by vips to implement writing to a memory buffer.
slist_equal | Test two lists for equality.
slist_filter | Remove all occurrences of an item from a list. Returns the new head of the list.
slist_fold2 | Fold over a slist, applying `fn` to each element.
slist_free_all | Free a `GSList` of things which need `g_free()`ing.
slist_map2 | Map over a slist. _copy() the list in case the callback changes it.
slist_map2_rev | Map backwards. We _reverse() rather than recurse and unwind to save stack.
slist_map4 | Map over a slist. _copy() the list in case the callback changes it.
start_many | Start function for many images in. `a` is a pointer to a `NULL`-terminated array of input images.
start_one | Start function for one image in. Input image is `a`.
stop_many | Stop function for many images in. `a` is a pointer to a `NULL`-terminated array of input images.
stop_one | Stop function for one image in. Input image is `a`.
strdup | `g_strdup()` a string. When `object` is freed, the string will be freed for you. If `object` is `NULL`, you need to free the memory yourself with `g_free()`.
strtod |
thread_execute | A newly created or reused thread will execute `func` with the argument `data`.
thread_isvips |
thread_shutdown | Free any thread-private data and flush any profiling information.
threadpool_run | This function runs a set of threads over an image. Each thread first calls `start` to create new per-thread state, then runs `allocate` to set up a new work unit (perhaps the next tile in an image, for example), then `work` to process that work unit. After each unit is processed, `progress` is called, so that the operation can give progress feedback. `progress` may be `NULL`.
tracked_aligned_alloc | Allocate an area of memory aligned on a boundary specified by `align` that will be tracked by `vips_tracked_get_mem()` and friends.
tracked_aligned_free | Only use it to free memory that was previously allocated with `vips_tracked_aligned_alloc()` with a `NULL` first argument.
tracked_close | Exactly as `close()`, but update the number of files currently open via `vips_tracked_get_files()`. This is used by the vips operation cache to drop cache when the number of files available is low.
tracked_free | Only use it to free memory that was previously allocated with `vips_tracked_malloc()` with a `NULL` first argument.
tracked_get_allocs | Returns the number of active allocations.
tracked_get_files | Returns the number of open files.
tracked_get_mem | Returns the number of bytes currently allocated via `vips_malloc()` and friends. vips uses this figure to decide when to start dropping cache, see `VipsOperation`.
tracked_get_mem_highwater | Returns the largest number of bytes simultaneously allocated via `vips_tracked_malloc()`. Handy for estimating max memory requirements for a program.
tracked_malloc | Allocate an area of memory that will be tracked by `vips_tracked_get_mem()` and friends.
tracked_open | Exactly as `open()`, but the number of files currently open via `vips_tracked_open()` is available via `vips_tracked_get_files()`. This is used by the vips operation cache to drop cache when the number of files available is low.
type_depth |
type_find | Search below `basename`, return the `GType` of the class whose name or `nickname` matches, or 0 for not found. If `basename` is `NULL`, the whole of `VipsObject` is searched.
type_map | Map over a type’s children. Stop when `fn` returns non-`NULL` and return that value.
type_map_all | Map over a type’s children, direct and indirect. Stop when `fn` returns non-`NULL` and return that value.
value_get_area | Get the pointer from an area. Don’t touch count (area is static).
value_get_array | Return the pointer to the array held by `value`. Optionally return the other properties of the array in `n`, `type`, `sizeof_type`.
value_get_array_double | Return the start of the array of doubles held by `value`. optionally return the number of elements in `n`.
value_get_array_image | Return the start of the array of images held by `value`. optionally return the number of elements in `n`.
value_get_array_int | Return the start of the array of ints held by `value`. optionally return the number of elements in `n`.
value_get_array_object | Return the start of the array of `GObject` held by `value`. Optionally return the number of elements in `n`.
value_get_blob | Returns the data pointer from a blob. Optionally returns the length too.
value_get_ref_string | Get the C string held internally by the `GValue`.
value_get_save_string | Get the C string held internally by the GValue.
value_is_null |
value_set_area | Set value to be a ref-counted area of memory with a free function.
value_set_array | Set `value` to be an array of things.
value_set_array_double | Set `value` to hold a copy of `array`. Pass in the array length in `n`.
value_set_array_image | Set `value` to hold an array of images. Pass in the array length in `n`.
value_set_array_int | Set `value` to hold a copy of `array`. Pass in the array length in `n`.
value_set_array_object | Set `value` to hold an array of `GObject`. Pass in the array length in `n`.
value_set_blob | Sets `value` to hold a `data`. When `value` is freed, `data` will be freed with `free_fn`. `value` also holds a note of the size of the memory area.
value_set_blob_free | Just like `vips_value_set_blob()`, but when `value` is freed, `data` will be freed with `g_free()`.
value_set_ref_string | Copies the C string `str` into `value`.
value_set_save_string | Copies the C string into `value`.
value_set_save_stringf | Generates a string and copies it into `value`.
vector_disable_targets | Takes a bitfield of targets to disable on the runtime platform. Handy for testing and benchmarking purposes.
vector_get_builtin_targets | Gets a bitfield of builtin targets that libvips was built with.
vector_get_supported_targets | Gets a bitfield of builtin targets that are supported on this CPU. The targets returned may change after calling `vips_vector_disable_targets()`.
vector_isenabled |
vector_set_enabled |
vector_target_name | Generates a human-readable ASCII string descriptor for a specific target.
verror | Append a message to the error buffer.
verror_system | Format the string in the style of `printf()` and append to the error buffer. Then create and append a localised message based on the system error code, usually the value of errno.
version | Get the major, minor or micro library version, with `flag` values 0, 1 and 2.
version_string | Get the VIPS version as a static string, including a build date and time. Do not free.

#### Function Macros

ABS |
ALIGNED |
ARG_BOOL |
ARG_BOXED |
ARG_DOUBLE |
ARG_ENUM |
ARG_FLAGS |
ARG_IMAGE |
ARG_INT |
ARG_INTERPOLATE |
ARG_OBJECT |
ARG_POINTER |
ARG_STRING |
ARG_UINT64 |
ARGUMENT_COLLECT_SET |
ARGUMENT_FOR_ALL |
ARRAY | Allocate memory for an array of objects of type `T`. The memory is not cleared.
ARRAY_ADDR |
BUF_STATIC | Initialize a heap buffer. For example:.
CEIL |
CLIP |
CLIP_CHAR |
CLIP_NONE |
CLIP_SHORT |
CLIP_UCHAR |
CLIP_UINT |
CLIP_USHORT |
COUNT_PIXELS |
DEG |
DEPRECATED_ENUMERATOR_FOR |
DEPRECATED_FOR |
DEPRECATED_MACRO_FOR |
FABS |
FCLIP |
FLOOR |
FMAX |
FMIN |
FREE |
FREEF |
GATE_FREE |
GATE_MALLOC |
GATE_START |
GATE_STOP |
IMAGE_ADDR | This macro returns a pointer to a pixel in an image, cast to a `VipsPel` *. It only works for images which are fully available in memory, so memory buffers and small mapped images only.
IMAGE_N_ELEMENTS |
IMAGE_N_PELS |
IMAGE_SIZEOF_ELEMENT |
IMAGE_SIZEOF_IMAGE |
IMAGE_SIZEOF_LINE |
IMAGE_SIZEOF_PEL |
INIT | `VIPS_INIT()` starts up the world of VIPS. You should call this on program startup before using any other VIPS operations. If you do not call `VIPS_INIT()`, VIPS will call it for you when you use your first VIPS operation, but it may not be able to get hold of `ARGV0` and VIPS may therefore be unable to find its data files. It is much better to call this macro yourself.
ISNAN |
MALLOC |
MATRIX | This macro returns a pointer to a pixel in an image, cast to a double*. The image must have a single band, be `VIPS_FORMAT_DOUBLE` and be fully available in memory, so memory buffers and small mapped images only.
MAX |
MIN |
NEW | Allocate memory for a thing of type `T`. The memory is not cleared.
NUMBER |
object_local |
ONCE |
RAD |
RECT_BOTTOM |
RECT_HCENTRE |
RECT_RIGHT |
RECT_VCENTRE |
REGION_ADDR | This macro returns a pointer to a pixel in a region. The (`X`, `Y`) coordinates need to be within the `VipsRect` (`R`->valid).
REGION_ADDR_TOPLEFT | This macro returns a pointer to the top-left pixel in the `VipsRegion`, that is, the pixel at (`R`->valid.left, `R`->valid.top).
REGION_LSKIP |
REGION_N_ELEMENTS |
REGION_SIZEOF_ELEMENT |
REGION_SIZEOF_LINE |
REGION_SIZEOF_PEL |
RINT |
ROUND |
ROUND_DOWN |
ROUND_INT |
ROUND_UINT |
ROUND_UP |
SBUF_FETCH | After a successful `VIPS_SBUF_REQUIRE()`, you can use this require times to fetch characters of input.
SBUF_GETC | Fetch the next character from the source.
SBUF_PEEK | After a successful `VIPS_SBUF_REQUIRE()`, you can index this to get require characters of input.
SBUF_REQUIRE | Make sure at least `require` characters are available for `VIPS_SBUF_PEEK()` and `VIPS_SBUF_FETCH()`.
SBUF_UNGETC | The opposite of `vips_sbuf_getc()`: undo the previous getc.
SETSTR |
SWAP |
TARGET_CLONES |
TARGET_PUTC |
UNREF |
UNROLL |

#### Constants

A_X0 | Areas under curves for illuminant A (2856K), 2 degree observer.
A_Y0 |
A_Z0 |
ARGUMENT_OPTIONAL_INPUT |
ARGUMENT_OPTIONAL_OUTPUT |
ARGUMENT_REQUIRED_INPUT |
ARGUMENT_REQUIRED_OUTPUT |
B_X0 | Areas under curves for illuminant B (4874K), 2 degree observer.
B_Y0 |
B_Z0 |
C_X0 | Areas under curves for illuminant C (6774K), 2 degree observer.
C_Y0 |
C_Z0 |
CONFIG |
D3250_X0 | Areas under curves for black body at 3250K, 2 degree observer.
D3250_Y0 |
D3250_Z0 |
D50_X0 | Areas under curves for D50, 2 degree observer.
D50_Y0 |
D50_Z0 |
D55_X0 | Areas under curves for D55, 2 degree observer.
D55_Y0 |
D55_Z0 |
D65_X0 | Areas under curves for D65, 2 degree observer.
D65_Y0 |
D65_Z0 |
D75_X0 | Areas under curves for D75, 2 degree observer.
D75_Y0 |
D75_Z0 |
D93_X0 | Areas under curves for D93, 2 degree observer.
D93_Y0 |
D93_Z0 |
DEFAULT_MAX_COORD |
E_X0 | Areas under curves for equal energy illuminant E.
E_Y0 |
E_Z0 |
ENABLE_DEPRECATED |
INTERPOLATE_SCALE | `VIPS_INTERPOLATE_SHIFT` as a multiplicative constant.
INTERPOLATE_SHIFT | Many of the vips interpolators use fixed-point arithmetic for value calculation. This is how many bits of precision they use.
LIBRARY_AGE |
LIBRARY_CURRENT |
LIBRARY_REVISION |
MAGIC_INTEL | The first four bytes of a VIPS file in Intel byte ordering.
MAGIC_SPARC | The first four bytes of a VIPS file in SPARC byte ordering.
MAJOR_VERSION |
META_BITS_PER_SAMPLE | The bits per sample for each channel.
META_CONCURRENCY | If set, the suggested concurrency for this image.
META_EXIF_NAME | The name that read and write operations use for the image’s EXIF data.
META_ICC_NAME | The name we use to attach an ICC profile. The file read and write operations for TIFF, JPEG, PNG and others use this item of metadata to attach and save ICC profiles. The profile is updated by the `vips_icc_transform()` operations.
META_IMAGEDESCRIPTION | The IMAGEDESCRIPTION tag. Often has useful metadata.
META_IPTC_NAME | The name that read and write operations use for the image’s IPTC data.
META_LOADER | Record the name of the original loader here. Handy for hinting file formats and for debugging.
META_N_PAGES | If set, the number of pages in the original file.
META_N_SUBIFDS | If set, the number of subifds in the first page of the file.
META_ORIENTATION | The orientation tag for this image. An int from 1 - 8 using the standard exif/tiff meanings.
META_PAGE_HEIGHT | If set, the height of each page when this image was loaded. If you save an image with “page-height” set to a format that supports multiple pages, such as tiff, the image will be saved as a series of pages.
META_PALETTE | Does this image have a palette?
META_PHOTOSHOP_NAME | The name that TIFF read and write operations use for the image’s TIFFTAG_PHOTOSHOP data.
META_RESOLUTION_UNIT | The JPEG and TIFF read and write operations use this to record the file’s preferred unit for resolution.
META_SEQUENTIAL | Images loaded via `vips_sequential()` have this int field defined. Some operations (eg. `vips_shrinkv()`) add extra caches if they see it on their input.
META_TILE_HEIGHT | If set, the height of the tiles for this image.
META_TILE_WIDTH | If set, the width of the tiles for this image.
META_XMP_NAME | The name that read and write operations use for the image’s XMP data.
MICRO_VERSION |
MINOR_VERSION |
PATH_MAX |
PI |
SBUF_BUFFER_SIZE |
TARGET_BUFFER_SIZE |
TARGET_CUSTOM_BUFFER_SIZE |
TRANSFORM_SCALE | `VIPS_TRANSFORM_SHIFT` as a multiplicative constant.
TRANSFORM_SHIFT | Many of the libvips interpolators use fixed-point arithmetic for coordinate calculation. This is how many bits of precision they use.
VERSION |
VERSION_STRING |