vips-cpp 8.16 libvips C++ binding

Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
VOption Class Reference

`#include <VImage8.h>`

## Public Member Functions
VOption * | set (const char *name, bool value)
VOption * | set (const char *name, int value)
VOption * | set (const char *name, guint64 value)
VOption * | set (const char *name, double value)
VOption * | set (const char *name, const char *value)
VOption * | set (const char *name, const VObject value)
VOption * | set (const char *name, std::vector< int > value)
VOption * | set (const char *name, std::vector< double > value)
VOption * | set (const char *name, std::vector< VImage > value)
VOption * | set (const char *name, VipsBlob *value)
VOption * | set (const char *name, bool *value)
VOption * | set (const char *name, int *value)
VOption * | set (const char *name, double *value)
VOption * | set (const char *name, VImage *value)
VOption * | set (const char *name, std::vector< double > *value)
VOption * | set (const char *name, VipsBlob **blob)
void | set_operation (VipsOperation *operation)
void | get_operation (VipsOperation *operation)

## Detailed Description

A list of name-value pairs. Pass these to libvips operations to set options. For example:

    VImage out = in.embed(10, 10, 1000, 1000, VImage::option()
        ->set("extend", "background")
        ->set("background", 128));

The `set` member functions will take copies (or hold references to) compound objects, so you can free them immediately afterwards if necessary.

You can get values back from operations by using the * form of the set member functions. For example:

    VImage in = VImage::new_from_file(argv[1]);
    int x, y;
    double value = in.max(VImage::option()
        ->set("x", &x)
        ->set("y", &y));

## Member Function Documentation

## ◆ get_operation()

void VOption::get_operation | ( | VipsOperation * | operation | ) |

Walk the set of options, fetching any output values. This is used internally by VImage::call().

## ◆ set() [1/16]

VOption * VOption::set | ( | const char * | name,
|  | bool * | value
| ) |  |

Set an option which will return a bool value.

## ◆ set() [2/16]

VOption * VOption::set | ( | const char * | name,
|  | bool | value
| ) |  |

Set an input boolean option.

## ◆ set() [3/16]

VOption * VOption::set | ( | const char * | name,
|  | const char * | value
| ) |  |

Set an input string option.

A copy is taken of the object.

## ◆ set() [4/16]

VOption * VOption::set | ( | const char * | name,
|  | const VObject | value
| ) |  |

Set a libvips object as an option. These can be images, sources, targets, etc.

A copy is taken of the object.

## ◆ set() [5/16]

VOption * VOption::set | ( | const char * | name,
|  | double * | value
| ) |  |

Set an option which will return a double value.

## ◆ set() [6/16]

VOption * VOption::set | ( | const char * | name,
|  | double | value
| ) |  |

Set an input double option.

## ◆ set() [7/16]

VOption * VOption::set | ( | const char * | name,
|  | guint64 | value
| ) |  |

Set an input unsigned 64-bit integer option.

## ◆ set() [8/16]

VOption * VOption::set | ( | const char * | name,
|  | int * | value
| ) |  |

Set an option which will return an integer value.

## ◆ set() [9/16]

VOption * VOption::set | ( | const char * | name,
|  | int | value
| ) |  |

Set an input int option. This is used for enums as well, or you can use the string version.

## ◆ set() [10/16]

VOption * VOption::set | ( | const char * | name,
|  | std::vector< double > * | value
| ) |  |

Set an option which will return an array of doubles.

## ◆ set() [11/16]

VOption * VOption::set | ( | const char * | name,
|  | std::vector< double > | value
| ) |  |

Set an array of doubles as an input option.

A copy is taken of the object.

## ◆ set() [12/16]

VOption * VOption::set | ( | const char * | name,
|  | std::vector< int > | value
| ) |  |

Set an array of integers as an input option.

A copy is taken of the object.

## ◆ set() [13/16]

VOption * VOption::set | ( | const char * | name,
|  | std::vector< VImage > | value
| ) |  |

Set an array of images as an input option.

A copy is taken of the object.

## ◆ set() [14/16]

VOption * VOption::set | ( | const char * | name,
|  | VImage * | value
| ) |  |

Set an option which will return a reference to an image.

## ◆ set() [15/16]

VOption * VOption::set | ( | const char * | name,
|  | VipsBlob ** | blob
| ) |  |

Set an option which will return a binary object, such as an ICC profile.

## ◆ set() [16/16]

VOption * VOption::set | ( | const char * | name,
|  | VipsBlob * | value
| ) |  |

Set a binary object an input option. Use vips_blob_new() to make blobs.

A copy is taken of the object.

## ◆ set_operation()

void VOption::set_operation | ( | VipsOperation * | operation | ) |

Walk the set of options, setting options on the operation. This is used internally by VImage::call().

The documentation for this class was generated from the following files:

- /build/reproducible-path/vips-8.16.1/cplusplus/include/vips/VImage8.h
- /build/reproducible-path/vips-8.16.1/cplusplus/VImage.cpp