Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/share/gtk-doc/html/libvips/ drwxr-xr-x | |
| Viewing file: Select action/file-type:
FunctionsProperties
Types and Values
DescriptionThe image class and associated types and macros. Images can be created from formatted files on disc, from C-style arrays on
disc, from formatted areas of memory, or from C-style arrays in memory. See
Once you have an image, you can get properties from it in the usual way.
You can use projection functions, like VIPS images are three-dimensional arrays, the dimensions being width,
height and bands. Each dimension can be up to 2 ** 31 pixels (or band
elements). An image has a format, meaning the machine number type used
to represent each value. VIPS supports 10 formats, from 8-bit unsigned
integer up to 128-bit double complex, see In VIPS, images are uninterpreted arrays, meaning that from the point of view of most operations, they are just large collections of numbers. There's no difference between an RGBA (RGB with alpha) image and a CMYK image, for example, they are both just four-band images. It's up to the user of the library to pass the right sort of image to each operation. To take an example, VIPS has VIPS has a feature to help (a little) with this: it sets a
VipsInterpretation hint for each image (see
Use things like You can also write images to other images. Create, for example, a temporary
disc image with See operation for an introduction to running operations on images, see header for getting and setting image metadata. See object for a discussion of the lower levels. FunctionsVipsStartFn ()void * (*VipsStartFn) ( Start a new processing sequence for this generate function. This allocates per-thread state, such as an input region. See also: VipsGenerateFn ()int (*VipsGenerateFn) ( Fill See also: Parameters
VipsStopFn ()int (*VipsStopFn) ( Stop a processing sequence. This frees per-thread state, such as an input region. See also: VIPS_IMAGE_ADDR()#define VIPS_IMAGE_ADDR( I, X, Y ) 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. If VIPS_DEBUG is defined, you get a version that checks bounds for you. See also: VIPS_MATRIX()#define VIPS_MATRIX( I, X, Y ) 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. If VIPS_DEBUG is defined, you get a version that checks bounds and image type for you. See also: vips_progress_set ()void
vips_progress_set (
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. vips_image_invalidate_all ()void
vips_image_invalidate_all (
Invalidate all pixel caches on You should call this function after
destructively modifying an image with something like The “invalidate” signal is emitted for all invalidated images. See also: [method] vips_image_minimise_all ()void
vips_image_minimise_all (
Minimise memory use on this image and any upstream images, that is, images which this image depends upon. This function is called automatically at the end of a computation, but it might be useful to call at other times. The “minimise” signal is emitted for all minimised images. [method] vips_image_is_sequential ()gboolean
vips_image_is_sequential (
TRUE if any of the images upstream from [method] vips_image_set_progress ()void vips_image_set_progress ( vips signals evaluation progress via the “preeval”,
“eval” and “posteval”
signals. Progress is signalled on the most-downstream image for which
[method] vips_image_iskilled ()gboolean
vips_image_iskilled (
If Handy for loops which need to run sets of threads which can fail. See also: [method] vips_image_set_kill ()void vips_image_set_kill ( Set the VipsImage.kill flag on an image. Handy for stopping sets of threads. See also: [method] vips_filename_get_filename ()char *
vips_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. Useful for language bindings. See also: vips_filename_get_options ()char *
vips_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. Useful for language bindings. See also: vips_image_new ()VipsImage *
vips_image_new (
vips_image_new() creates a new, empty VipsImage. If you write to one of these images, vips will just attach some callbacks, no pixels will be generated. Write pixels to an image with [constructor] vips_image_new_memory ()VipsImage *
vips_image_new_memory (
vips_image_new_memory() creates a new VipsImage which, when written to, will create a memory image. See also: [constructor] vips_image_memory ()VipsImage *
vips_image_memory (
A renamed See also: [constructor] vips_image_new_from_file ()VipsImage * vips_image_new_from_file ( Optional arguments:
vips_image_new_from_file() opens Load options may be appended to vips_image_new_from_file() always returns immediately with the header fields filled in. No pixels are actually read until you first access them.
In VIPS_ACCESS_RANDOM mode, small images are decompressed to memory and then processed from there. Large images are decompressed to temporary random-access files on disc and then processed from there. Set The disc threshold can be set with the "--vips-disc-threshold"
command-line argument, or the For example:
Will open "fred.tif", reading page 12.
Will open "fred.jpg", downsampling by a factor of two. Use See also: [constructor] vips_image_new_from_file_RW ()VipsImage *
vips_image_new_from_file_RW (
Opens the named file for simultaneous reading and writing. This will only work for VIPS files in a format native to your machine. It is only for paintbox-type applications. See also: [constructor] vips_image_new_from_file_raw ()VipsImage * vips_image_new_from_file_raw ( This function maps the named file and returns a VipsImage you can use to read it. It returns an 8-bit image with See also: [constructor] vips_image_new_from_memory ()VipsImage * vips_image_new_from_memory ( This function wraps a VipsImage around a memory area. The memory area
must be a simple array, for example RGBRGBRGB, left-to-right,
top-to-bottom. Use VIPS does not take responsibility for the area of memory, it's up to you to make sure it's freed when the image is closed. See for example “close”. Because VIPS is "borrowing" Use See also: [constructor] vips_image_new_from_memory_copy ()VipsImage * vips_image_new_from_memory_copy ( Like See also: [constructor] vips_image_new_from_buffer ()VipsImage * vips_image_new_from_buffer ( Loads an image from the formatted area of memory VIPS does not take responsibility for the area of memory, it's up to you to make sure it's freed when the image is closed. See for example “close”. Load options may be given in See also: [constructor] vips_image_new_from_source ()VipsImage * vips_image_new_from_source ( Loads an image from the formatted source Load options may be given in See also: [constructor] vips_image_new_matrix ()VipsImage * vips_image_new_matrix ( This convenience function makes an image which is a matrix: a one-band VIPS_FORMAT_DOUBLE image held in memory. Use Use See also: [constructor] vips_image_new_matrixv ()VipsImage * vips_image_new_matrixv ( As See also: [constructor] vips_image_new_matrix_from_array ()VipsImage * vips_image_new_matrix_from_array ( A binding-friendly version of [constructor] vips_image_matrix_from_array ()VipsImage * vips_image_matrix_from_array ( A renamed [constructor] vips_image_new_from_image ()VipsImage * vips_image_new_from_image ( Creates a new image with width, height, format, interpretation, resolution
and offset taken from See also: [constructor] vips_image_new_from_image1 ()VipsImage * vips_image_new_from_image1 ( Creates a new image with width, height, format, interpretation, resolution
and offset taken from See also: [constructor] vips_image_set_delete_on_close ()void vips_image_set_delete_on_close ( Sets the delete_on_close flag for the image. If this flag is set, when
This function is clearly extremely dangerous, use with great caution. See also: [method] vips_get_disc_threshold ()guint64
vips_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_temp_file ()VipsImage *
vips_image_new_temp_file (
Make a VipsImage which, when written to, will create a temporary file on
disc. The file will be automatically deleted when the image is destroyed.
The file is created in the temporary directory. This is set with the
environment variable TMPDIR. If this is not set, then on Unix systems, vips
will default to /tmp. On Windows, vips uses See also: [constructor] vips_image_write ()int vips_image_write ( Write See also: [method] vips_image_write_to_file ()int vips_image_write_to_file ( Writes Save options may be appended to See also: [method] vips_image_write_to_buffer ()int vips_image_write_to_buffer ( Writes Save options may be appended to Currently only TIFF, JPEG and PNG formats are supported. You can call the various save operations directly if you wish, see
See also: [method] vips_image_write_to_target ()int vips_image_write_to_target ( Writes Save options may be appended to You can call the various save operations directly if you wish, see
See also: [method] vips_image_write_to_memory ()void * vips_image_write_to_memory ( Writes The caller is responsible for freeing this memory with See also: [method] vips_image_decode_predict ()int vips_image_decode_predict ( We often need to know what an image will decode to without actually decoding it, for example, in arg checking. See also: [method] vips_image_decode ()int vips_image_decode ( A convenience function to unpack to a format that we can compute with.
This unpacks LABQ to plain LAB. Use See also: [method] vips_image_encode ()int vips_image_encode ( A convenience function to pack to a coding. The inverse of
See also: [method] vips_image_isMSBfirst ()gboolean
vips_image_isMSBfirst (
Return [method] vips_image_isfile ()gboolean
vips_image_isfile (
Return [method] vips_image_ispartial ()gboolean
vips_image_ispartial (
Return [method] vips_image_hasalpha ()gboolean
vips_image_hasalpha (
Look at an image's interpretation and see if it has extra alpha bands. For example, a 4-band VIPS_INTERPRETATION_sRGB would, but a six-band VIPS_INTERPRETATION_MULTIBAND would not. Return [method] vips_image_copy_memory ()VipsImage *
vips_image_copy_memory (
Make an image which is an area of memory. If This operation is thread-safe, unlike If you are sure that See also: [method] vips_image_wio_input ()int
vips_image_wio_input (
Check that an image is readable via the Since this function modifies See also: [method] vips_image_pio_input ()int
vips_image_pio_input (
Check that an image is readable with See also: [method] vips_image_pio_output ()int
vips_image_pio_output (
Check that an image is writeable with See also: [method] vips_image_inplace ()int
vips_image_inplace (
Gets Since this function modifies See also: [method] vips_image_write_prepare ()int
vips_image_write_prepare (
Call this after setting header fields (width, height, and so on) to allocate resources ready for writing. Normally this function is called for you by [method] vips_image_write_line ()int vips_image_write_line ( Write a line of pixels to an image. This function must be called repeatedly
with See also: [method] vips_band_format_isint ()gboolean
vips_band_format_isint (
Return vips_band_format_isuint ()gboolean
vips_band_format_isuint (
Return vips_band_format_is8bit ()gboolean
vips_band_format_is8bit (
Return vips_band_format_isfloat ()gboolean
vips_band_format_isfloat (
Return vips_band_format_iscomplex ()gboolean
vips_band_format_iscomplex (
Return vips_system ()int vips_system ( Optional arguments:
vips_system() runs a command, optionally passing a set of images in and
optionally getting an image back. The command's stdout is returned in First, if If The command string to run is made by substituting the first set of %s
in The command is executed with After the command finishes, if Finally the input images are deleted. For example, this call will run the ImageMagick convert program on an image, using JPEG files to pass images into and out of the convert command.
vips_array_image_new ()VipsArrayImage * vips_array_image_new ( Allocate a new array of images and copy The images will all be reffed by this function. They
will be automatically unreffed for you by
Add an extra NULL element at the end, handy for eg.
See also: VipsArea. [constructor] vips_array_image_newv ()VipsArrayImage * vips_array_image_newv ( Allocate a new array of The images will all be reffed by this function. They
will be automatically unreffed for you by
Add an extra NULL element at the end, handy for eg.
See also: [constructor] vips_array_image_new_from_string ()VipsArrayImage * vips_array_image_new_from_string ( vips_array_image_empty ()VipsArrayImage *
vips_array_image_empty (
Make an empty image array.
Handy with See also: [constructor] vips_array_image_append ()VipsArrayImage * vips_array_image_append ( Make a new VipsArrayImage, one larger than See also: [method] vips_array_image_get ()VipsImage ** vips_array_image_get ( Fetch an image array from a VipsArrayImage. Useful for language bindings. [method] vips_value_get_array_image ()VipsImage ** vips_value_get_array_image ( Return the start of the array of images held by See also: vips_value_set_array_image ()void vips_value_set_array_image ( Set See also: vips_reorder_prepare_many ()int vips_reorder_prepare_many ( vips_reorder_prepare_many() runs It tries to request the regions in the order which will cause least recomputation. This can give a large speedup, in some cases. See also: [method] Parameters
vips_reorder_margin_hint ()void vips_reorder_margin_hint ( vips_reorder_margin_hint() sets a hint that This information is used by See also: [method] Types and ValuesVIPS_MAGIC_INTEL#define VIPS_MAGIC_INTEL (0xb6a6f208U) The first four bytes of a VIPS file in Intel byte ordering. VIPS_MAGIC_SPARC#define VIPS_MAGIC_SPARC (0x08f2a6b6U) The first four bytes of a VIPS file in SPARC byte ordering. enum VipsDemandStyleSee These demand styles are given below in order of increasing
restrictiveness. When demanding output from a pipeline,
VIPS_DEMAND_STYLE_THINSTRIP --- This operation would like to output strips the width of the image and a few pels high. This is option suitable for point-to-point operations, such as those in the arithmetic package. This option is only efficient for cases where each output pel depends upon the pel in the corresponding position in the input image. VIPS_DEMAND_STYLE_FATSTRIP --- This operation would like to output strips
the width of the image and as high as possible. This option is suitable
for area operations which do not violently transform coordinates, such
as VIPS_DEMAND_STYLE_SMALLTILE --- This is the most general demand format. Output is demanded in small (around 100x100 pel) sections. This style works reasonably efficiently, even for bizzare operations like 45 degree rotate. VIPS_DEMAND_STYLE_ANY --- This image is not being demand-read from a disc
file (even indirectly) so any demand style is OK. It's used for things like
See also: enum VipsInterpretationHow 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. RGB and sRGB are treated in the same way. Use the colourspace functions if you want some other behaviour. The gaps in numbering are historical and must be maintained. Allocate new numbers from the end. Members
enum VipsBandFormatThe format used for each band element. Each corresponds to a native C type for the current machine. For example, VIPS_FORMAT_USHORT is unsigned short. enum VipsCodingHow pixels are coded. Normally, pixels are uncoded and can be manipulated as you would expect. However some file formats code pixels for compression, and sometimes it's useful to be able to manipulate images in the coded format. The gaps in the numbering are historical and must be maintained. Allocate new numbers from the end. enum VipsAccessThe type of access an operation has to supply. See
VipsProgresstypedef struct {
int run; /* Time we have been running */
int eta; /* Estimated seconds of computation left */
gint64 tpels; /* Number of pels we expect to calculate */
gint64 npels; /* Number of pels calculated so far */
int percent; /* Percent complete */
GTimer *start; /* Start time */
} VipsProgress;
A structure available to eval callbacks giving information on evaluation progress. See “eval”. Property DetailsThe
|
image |
the image being calculated |
|
progress |
VipsProgress for this image |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“invalidate” signalvoid user_function (VipsImage *image, gpointer user_data)
The ::invalidate signal is emitted when an image or one of it's
upstream data sources has been destructively modified. See
vips_image_invalidate_all().
image |
the image that has changed |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“minimise” signalvoid user_function (VipsImage *image, gpointer user_data)
The ::minimise signal is emitted when an image has been asked to
minimise memory usage. All non-essential caches are dropped.
See
vips_image_minimise_all().
image |
the image that is being minimised |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“posteval” signalvoid user_function (VipsImage *image, gpointer progress, gpointer user_data)
The ::posteval signal is emitted once at the end of the computation
of image
. It's a good place to shut down evaluation feedback.
Use vips_image_set_progress() to turn on progress reporting for an
image.
image |
the image that was calculated |
|
progress |
VipsProgress for this image |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“preeval” signalvoid user_function (VipsImage *image, gpointer progress, gpointer user_data)
The ::preeval signal is emitted once before computation of image
starts. It's a good place to set up evaluation feedback.
Use vips_image_set_progress() to turn on progress reporting for an
image.
image |
the image to be calculated |
|
progress |
VipsProgress for this image |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“written” signalvoid user_function (VipsImage *image, gpointer result, gpointer user_data)
The ::written signal is emitted just after an image has been written to. It is used by vips to implement things like write to foreign file formats.
image |
the image that was calculated |
|
result |
set to non-zero to indicate error |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0063 ]-- |