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:
FunctionsTypes and Values
DescriptionThese functions let you get at image header data (including metadata) in a uniform way. Use You can attach arbitrary metadata to images. Metadata is copied as images are processed, so all images which used this image as input, directly or indirectly, will have this same bit of metadata attached to them. Copying is implemented with reference-counted pointers, so it is efficient, even for large items of data. This does however mean that metadata items need to be immutable. Metadata is handy for things like ICC profiles or EXIF data. Various convenience functions (eg. Items of metadata are identified by strings. Some strings are reserved, for example the ICC profile for an image is known by convention as "icc-profile-data". If you save an image in VIPS format, all metadata (with a restriction, see
below) is automatically saved for you in a block of XML at the end of the
file. When you load a VIPS image, the metadata is restored. You can use the
VIPS metadata is based on VIPS provides a couple of base classes which implement reference-counted areas of memory. If you base your metadata on one of these types, it can be copied between images efficiently. Functionsvips_format_sizeof_unsafe ()guint64
vips_format_sizeof_unsafe (
A fast but dangerous version of [skip] vips_image_guess_format ()VipsBandFormat
vips_image_guess_format (
Return the VipsBandFormat for an image, guessing a sane value if the set value looks crazy. For example, for a float image tagged as rgb16, we'd return ushort. [method] vips_image_get_interpretation ()VipsInterpretation
vips_image_get_interpretation (
Return the VipsInterpretation set in the image header.
Use [method] vips_image_guess_interpretation ()VipsInterpretation
vips_image_guess_interpretation (
Return the VipsInterpretation for an image, guessing a sane value if the set value looks crazy. [method] vips_image_get_mode ()const char *
vips_image_get_mode (
Image modes are things like [method] vips_image_get_scale ()double
vips_image_get_scale (
Matrix images can have an optional [method] vips_image_get_offset ()double
vips_image_get_offset (
Matrix images can have an optional [method] vips_image_get_page_height ()int
vips_image_get_page_height (
Multi-page images can have a page height. Fetch it, and sanity check it. If page-height is not set, it defaults to the image height. [method] vips_image_get_n_pages ()int
vips_image_get_n_pages (
Fetch and sanity-check VIPS_META_N_PAGES. Default to 1 if not present or crazy. This is the number of pages in the image file, not the number of pages that
have been loaded into [method] vips_image_get_data ()const void *
vips_image_get_data (
Return a pointer to the image's pixel data, if possible. This can involve allocating large amounts of memory and performing a long computation. Image pixels are laid out in band-packed rows. Since this function modifies See also: [method] vips_image_init_fields ()void vips_image_init_fields ( A convenience function to set the header fields after creating an image.
Normally you copy the fields from your input images with
See also: [method] vips_image_set ()void vips_image_set ( Set a piece of metadata on For example, to set an integer on an image (though you would use the
convenience function
See also: [method] vips_image_get ()int vips_image_get ( Fill This will return -1 and add a message to the error buffer if the field
does not exist. Use For example, to read a double from an image (though of course you would use
See also: [method] vips_image_get_as_string ()int vips_image_get_as_string ( Returns This will base64-encode BLOBs, for example. Use See also: [method] vips_image_get_typeof ()GType vips_image_get_typeof ( Read the See also: [method] vips_image_remove ()gboolean vips_image_remove ( Find and remove an item of metadata. Return See also: [method] VipsImageMapFn ()void * (*VipsImageMapFn) ( vips_image_map ()void * vips_image_map ( This function calls Like all _map functions, the user function should return See also: [method] vips_image_get_fields ()gchar **
vips_image_get_fields (
Get a This is handy for language bindings. From C, it's usually more convenient to
use [method] vips_image_set_area ()void vips_image_set_area ( Attaches See also: [method] vips_image_get_area ()int vips_image_get_area ( Gets See also: [method] vips_image_set_blob ()void vips_image_set_blob ( Attaches See also: [method] vips_image_set_blob_copy ()void vips_image_set_blob_copy ( Attaches See also: [method] vips_image_get_blob ()int vips_image_get_blob ( Gets See also: [method] vips_image_get_int ()int vips_image_get_int ( Gets See also: [method] vips_image_set_int ()void vips_image_set_int ( Attaches See also: [method] vips_image_get_double ()int vips_image_get_double ( Gets See also: [method] vips_image_set_double ()void vips_image_set_double ( Attaches See also: [method] vips_image_get_string ()int vips_image_get_string ( Gets Do not free Use See also: [method] vips_image_set_string ()void vips_image_set_string ( Attaches See also: [method] vips_image_print_field ()void vips_image_print_field ( Prints field [method] vips_image_get_image ()int vips_image_get_image ( Gets Use See also: [method] vips_image_set_image ()void vips_image_set_image ( Attaches See also: [method] vips_image_set_array_int ()void vips_image_set_array_int ( Attaches See also: [method] vips_image_get_array_int ()int vips_image_get_array_int ( Gets Do not free Use See also: [method] vips_image_history_printf ()int vips_image_history_printf ( Add a line to the image history. The For example:
Might add the string
VIPS operations don't add history lines for you because a single action at the application level might involve many VIPS operations. History must be recorded by the application. [method] vips_image_history_args ()int vips_image_history_args ( Formats the name/argv as a single string and calls
See also: [method] vips_image_get_history ()const char *
vips_image_get_history (
This function reads the image history as a C string. The string is owned by VIPS and must not be freed. VIPS tracks the history of each image, that is, the sequence of operations
that generated that image. Applications built on VIPS need to call
See also: [method] Types and ValuesVIPS_META_EXIF_NAME#define VIPS_META_EXIF_NAME "exif-data" The name that JPEG read and write operations use for the image's EXIF data. VIPS_META_XMP_NAME#define VIPS_META_XMP_NAME "xmp-data" The name that read and write operations use for the image's XMP data. VIPS_META_IPTC_NAME#define VIPS_META_IPTC_NAME "iptc-data" The name that read and write operations use for the image's IPTC data. VIPS_META_PHOTOSHOP_NAME#define VIPS_META_PHOTOSHOP_NAME "photoshop-data" The name that TIFF read and write operations use for the image's TIFFTAG_PHOTOSHOP data. VIPS_META_ICC_NAME#define VIPS_META_ICC_NAME "icc-profile-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_META_IMAGEDESCRIPTION#define VIPS_META_IMAGEDESCRIPTION "image-description" The IMAGEDESCRIPTION tag. Often has useful metadata. VIPS_META_RESOLUTION_UNIT#define VIPS_META_RESOLUTION_UNIT "resolution-unit" The JPEG and TIFF read and write operations use this to record the file's preferred unit for resolution. VIPS_META_LOADER#define VIPS_META_LOADER "vips-loader" Record the name of the original loader here. Handy for hinting file formats and for debugging. VIPS_META_SEQUENTIAL#define VIPS_META_SEQUENTIAL "vips-sequential" Images loaded via VIPS_META_ORIENTATION#define VIPS_META_ORIENTATION "orientation" The orientation tag for this image. An int from 1 - 8 using the standard exif/tiff meanings.
VIPS_META_PAGE_HEIGHT#define VIPS_META_PAGE_HEIGHT "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. |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.014 ]-- |