Areas under curves for illuminant B (4874K), 2 degree observer.
Areas under curves for illuminant C (6774K), 2 degree observer.
Areas under curves for black body at 3250K, 2 degree observer.
Areas under curves for D50, 2 degree observer.
Areas under curves for D55, 2 degree observer.
Areas under curves for D65, 2 degree observer.
Areas under curves for D75, 2 degree observer.
Areas under curves for D93, 2 degree observer.
Areas under curves for equal energy illuminant E.
#VIPS_INTERPOLATE_SHIFT as a multiplicative constant.
Many of the vips interpolators use fixed-point arithmetic for value calcualtion. This is how many bits of precision they use.
The first four bytes of a VIPS file in Intel byte ordering.
The first four bytes of a VIPS file in SPARC byte ordering.
The name that JPEG read and write operations use for the image's EXIF data.
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.
The IMAGEDESCRIPTION tag. Often has useful metadata.
The name that read and write operations use for the image's IPTC data.
Record the name of the original loader here. Handy for hinting file formats and for debugging.
If set, the number of pages in the original file.
If set, the number of subifds in the first page of the file.
The orientation tag for this image. An int from 1 - 8 using the standard exif/tiff meanings.
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.
The name that TIFF read and write operations use for the image's TIFFTAG_PHOTOSHOP data.
The JPEG and TIFF read and write operations use this to record the file's preferred unit for resolution.
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.
The name that read and write operations use for the image's XMP data.
The name of the shared object containing the vips library, for example "libvips.so.42", or "libvips-42.dll".
#VIPS_TRANSFORM_SHIFT as a multiplicative constant.
Many of the vips interpolators use fixed-point arithmetic for coordinate calculation. This is how many bits of precision they use.
Add the standard vips %GOptionEntry to a %GOptionGroup.
See also: g_option_group_new().
group to add to
Return %TRUE if format
is uchar or schar.
format to test
Return %TRUE if fmt
is one of the complex types.
format to test
Return %TRUE if format
is one of the float types.
format to test
Return %TRUE if format
is one of the integer types.
format to test
Return %TRUE if format
is one of the unsigned integer types.
format to test
Drop the whole operation cache, handy for leak tracking. Also called automatically on vips_shutdown().
Get the maximum number of operations we keep in cache.
Get the maximum number of tracked files we allow before we start dropping cached operations. See vips_tracked_get_files().
libvips only tracks file descriptors it allocates, it can't track ones allocated by external libraries. If you use an operation like vips_magickload(), most of the descriptors it uses won't be included.
See also: vips_tracked_get_files().
Get the maximum amount of tracked memory we allow before we start dropping cached operations. See vips_tracked_get_mem().
See also: vips_tracked_get_mem().
Get the current number of operations in cache.
Print the whole operation cache to stdout. Handy for debugging.
Handy for debugging. Print the operation cache to stdout just before exit.
See also: vips_cache_set_trace().
if %TRUE, dump the operation cache on exit
Set the maximum number of operations we keep in cache.
maximum number of operation to cache
Set the maximum number of tracked files we allow before we start dropping cached operations. See vips_tracked_get_files().
See also: vips_tracked_get_files().
max open files we allow
Set the maximum amount of tracked memory we allow before we start dropping cached operations. See vips_tracked_get_mem().
libvips only tracks memory it allocates, it can't track memory allocated by external libraries. If you use an operation like vips_magickload(), most of the memory it uses won't be included.
See also: vips_tracked_get_mem().
maximum amount of tracked memory we use
Handy for debugging. Print operation cache actions to stdout as we run.
You can set the environment variable VIPS_TRACE
to turn this option on, or
use the command-line flag --vips-cache-trace
.
See also: vips_cache_set_dump().
if %TRUE, trace the operation cache
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.
See also: vips_error().
the originating domain for the error message
image to check
band number
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.
See also: vips_error().
the originating domain for the error message
first image to check
second image to check
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.
See also: vips_check_bands_1orn().
the originating domain for the error message
image to check
number of bands, or 1
Check that the image has the specified format. Otherwise set an error message and return non-zero.
See also: vips_error().
the originating domain for the error message
image to check
format to test for
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.
See also: vips_error().
Matrix images must have width and height less than 100000 and have 1 band.
Return 0 if the image will pass as a matrix, or -1 and set an error message otherwise.
out
is set to be im
cast to double and stored in memory. Use
VIPS_MATRIX() to address values in out
.
You must unref out
when you are done with it.
See also: VIPS_MATRIX(), vips_object_local()
Check that prec
image is either float or int.
If not, set an error message
and return non-zero.
See also: vips_error().
the originating domain for the error message
precision to check
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.
See also: vips_error().
the originating domain for the error message
number of elements in vector
image to check against
Check that n
== len
.
See also: vips_error().
the originating domain for the error message
number of elements in vector
number of elements vector should have
Search below basename,
return the first class whose name or nickname
matches.
See also: vips_type_find()
name of base class
search for a class with this nickname
Calculate Ccmc from C.
Chroma
Calculate C from Ccmc using a table. Call vips_col_make_tables_CMC() at least once before using this function.
Ccmc
Calculate ab from Ch, h in degrees.
Chroma
Hue angle (degrees)
return CIE a* value
return CIE b* value
Calculate hcmc from C and h.
Chroma
Hue (degrees)
Calculate h from C and hcmc, using a table. Call vips_col_make_tables_CMC() at least once before using this function.
Chroma
Hue cmc (degrees)
CIEDE2000, from:
Luo, Cui, Rigg, "The Development of the CIE 2000 Colour-Difference Formula: CIEDE2000", COLOR research and application, pp 340
Input coordinate 1
Input coordinate 1
Input coordinate 1
Input coordinate 2
Input coordinate 2
Input coordinate 2
Calculate Lcmc from L.
CIE L*
Calculate XYZ from Lab, D65.
See also: vips_Lab2XYZ().
Input CIE Lab value
Input CIE Lab value
Input CIE Lab value
Calculate L from Lcmc using a table. Call vips_col_make_tables_CMC() at least once before using this function.
L cmc
Make the lookup tables for cmc.
Turn scRGB into XYZ.
See also: vips_scRGB2XYZ().
Input scRGB value
Input scRGB value
Input scRGB value
Calculate XYZ from Lab, D65.
See also: vips_XYZ2Lab().
Input CIE XYZ colour
Input CIE XYZ colour
Input CIE XYZ colour
Turn XYZ into scRGB.
See also: vips_XYZ2scRGB().
Input XYZ value
Input XYZ value
Input XYZ value
Returns the number of worker threads that vips should use when running a #VipsThreadPool.
vips gets this values from these sources in turn:
If vips_concurrency_set() has been called, this value is used. The special value 0 means "default". You can also use the command-line argument "--vips-concurrency" to set this value.
If vips_concurrency_set() has not been called and no command-line argument was used, vips uses the value of the environment variable VIPS_CONCURRENCY,
If VIPS_CONCURRENCY has not been set, vips finds the number of hardware threads that the host machine can run in parallel and uses that value.
The final value is clipped to the range 1 - 1024.
See also: vips_concurrency_get().
Sets the number of worker threads that vips should use when running a #VipsThreadPool.
The special value 0 means "default". In this case, the number of threads is set by the environment variable VIPS_CONCURRENCY, or if that is not set, the number of threads available on the host machine.
See also: vips_concurrency_get().
number of threads to run
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.
See also: vips_error_clear().
Return a copy of the vips error buffer, and clear it.
Clear and reset the error buffer. This is typically called after presenting an error to the user.
See also: vips_error_buffer().
Stop errors being logged. Use vips_error_thaw() to unfreeze. You can nest freeze/thaw pairs.
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.
See vips_g_error() for the inverse operation.
See also: g_set_error(), vips_g_error().
Reenable error logging.
Given a vips filename like "fred.jpg[Q=90]", return a new string of just the filename part, "fred.jpg" in this case.
Useful for language bindings.
See also: vips_filename_get_options().
a filename including a set of options
Given a vips filename like "fred.jpg[Q=90]", return a new string of just the options part, "[Q=90]" in this case.
Useful for language bindings.
See also: vips_filename_get_filename().
a filename including a set of options
This function adds the %GError to the vips error buffer and clears it. It's the opposite of vips_error_g().
See also: vips_error_g().
See also: VIPS_INIT().
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().
Return the program name. This can be useful for the user tio see,.
See also: VIPS_INIT().
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").
On success, vips_guess_libdir() returns the libdir it discovered, and as a side effect, sets the prefix environment variable (if it's not set).
Don't free the return string!
See also: vips_guess_prefix().
program name (typically argv[0])
save prefix in this environment variable
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").
On success, vips_guess_prefix() returns the prefix it discovered, and as a side effect, sets the environment variable (if it's not set).
Don't free the return string!
See also: vips_guess_libdir().
program name (typically argv[0])
save prefix in this environment variable
VIPS can optionally be built without the ICC library. Use this function to test for its availability.
This function starts up libvips, see VIPS_INIT().
This function is for bindings which need to start up vips. C programs should use the VIPS_INIT() macro, which does some extra checks.
See also: VIPS_INIT().
name of application
Turn on or off vips leak checking. See also --vips-leak,
vips_add_option_entries() and the VIPS_LEAK
environment variable.
You should call this very early in your program.
turn leak checking on or off
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().
This function cannot fail. See vips_tracked_malloc() if you are allocating large amounts of memory.
See also: vips_tracked_malloc().
allocate memory local to this #VipsObject, or %NULL
number of bytes to allocate
Return the VIPS nickname for a %GType. Handy for language bindings.
#GType to search for
Return the filename part of a vips7 path. For testing only.
path to split
Return the mode part of a vips7 path. For testing only.
path to split
If set, vips will print messages about the progress of computation to stdout. This can also be enabled with the --vips-progress option, or by setting the environment variable VIPS_PROGRESS.
%TRUE to enable progress messages
Pythagorean distance between two points in colour space. Lab/XYZ/CMC etc.
Input coordinate 1
Input coordinate 1
Input coordinate 1
Input coordinate 2
Input coordinate 2
Input coordinate 2
Call this to drop caches, close plugins, terminate background threads, and finalize any internal library testing.
vips_shutdown() is optional. If you don't call it, your platform will clean up for you. The only negative consequences are that the leak checker and the profiler will not work.
You may call VIPS_INIT() many times and vips_shutdown() many times, but you must not call VIPS_INIT() after vips_shutdown(). In other words, you cannot stop and restart libvips.
See also: vips_profile_set(), vips_leak_set().
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().
This function cannot fail.
See also: vips_malloc().
Free any thread-private data and flush any profiling information.
This function needs to be called when a thread that has been using vips exits. It is called for you by vips_shutdown() and for any threads created within the #VipsThreadPool.
You will need to call it from threads created in other ways or there will be memory leaks. If you do not call it, vips will generate a warning message.
It may be called many times, and you can continue using vips after calling it. Calling it too often will reduce performance.
Exactly as close(2), 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.
You must only close file descriptors opened with vips_tracked_open().
See also: vips_tracked_open(), vips_tracked_get_files().
file to close()
Only use it to free memory that was previously allocated with vips_tracked_malloc() with a %NULL first argument.
See also: vips_tracked_malloc().
memory to free
Returns the number of active allocations.
Returns the number of open files.
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.
Returns the largest number of bytes simultaneously allocated via vips_tracked_malloc(). Handy for estimating max memory requirements for a program.
Allocate an area of memory that will be tracked by vips_tracked_get_mem() and friends.
If allocation fails, vips_malloc() returns %NULL and sets an error message.
You must only free the memory returned with vips_tracked_free().
See also: vips_tracked_free(), vips_malloc().
number of bytes to allocate
Exactly as open(2), 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.
You must only close the file descriptor with vips_tracked_close().
pathname
should be utf8.
See also: vips_tracked_close(), vips_tracked_get_files().
name of file to open
flags for open()
open mode
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.
This function uses a cache, so it should be quick.
See also: vips_class_find()
name of base class
search for a class with this nickname
Get the pointer from an area. Don't touch count (area is static).
get from this value
Return the pointer to the array held by value
.
Optionally return the other properties of the array in n,
type,
sizeof_type
.
See also: vips_value_set_array().
%GValue to get from
Return the start of the array of doubles held by value
.
optionally return the number of elements in n
.
See also: vips_array_double_new().
%GValue to get from
Return the start of the array of ints held by value
.
optionally return the number of elements in n
.
See also: vips_array_int_new().
%GValue to get from
Returns the data pointer from a blob. Optionally returns the length too.
blobs are things like ICC profiles or EXIF data. They are relocatable, and are saved to VIPS files for you coded as base64 inside the XML. They are copied by copying reference-counted pointers.
See also: vips_value_set_blob()
GValue to set
Get the C string held internally by the %GValue.
%GValue to get from
Get the C string held internally by the GValue.
GValue to get from
Set value to be a ref-counted area of memory with a free function.
set this value
data will be freed with this function
Set value
to be an array of things.
This allocates memory but does not initialise the contents: get the pointer and write instead.
number of elements
the type of each element
the sizeof each element
Set value
to hold a copy of array
. Pass in the array length in n
.
See also: vips_array_double_get().
%GValue to get from
array of doubles
Set value
to hold an array of images. Pass in the array length in n
.
See also: vips_array_image_get().
%GValue to get from
the number of elements
Set value
to hold a copy of array
. Pass in the array length in n
.
See also: vips_array_int_get().
%GValue to get from
array of ints
Set value
to hold an array of %GObject. Pass in the array length in n
.
See also: vips_value_get_array_object().
the number of elements
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.
blobs are things like ICC profiles or EXIF data. They are relocatable, and are saved to VIPS files for you coded as base64 inside the XML. They are copied by copying reference-counted pointers.
See also: vips_value_get_blob()
free function for data
length of memory area
Just like vips_value_set_blob(), but when
value
is freed, data
will be
freed with g_free().
This can be easier to call for language bindings.
See also: vips_value_set_blob()
GValue to set
pointer to area of memory
length of memory area
Copies the C string str
into value
.
vips_ref_string are immutable C strings that are copied between images by copying reference-counted pointers, making them much more efficient than regular %GValue strings.
str
should be a valid utf-8 string.
C string to copy into the GValue
Copies the C string into value
.
str
should be a valid utf-8 string.
C string to copy into the GValue
Get the major, minor or micro library version, with flag
values 0, 1 and
2.
Get the ABI current, revision and age (as used by libtool) with flag
values 3, 4, 5.
which field of the version to get
Get the VIPS version as a static string, including a build date and time. Do not free.
Areas under curves for illuminant A (2856K), 2 degree observer.