Movatterモバイル変換


[0]ホーム

URL:


libvips

A fast image processing library with low memory needs.

DownloadInstallDocumentationIssuesWikilibvips projectslibvips on GitHub
Top  | DescriptionHomeUpPrevNext

header

header — get, set and walk image headers

Stability Level

Stable, unless otherwise indicated

Functions

guint64vips_format_sizeof ()
guint64vips_format_sizeof_unsafe ()
doublevips_interpretation_max_alpha ()
intvips_image_get_width ()
intvips_image_get_height ()
intvips_image_get_bands ()
VipsBandFormatvips_image_get_format ()
doublevips_image_get_format_max ()
VipsBandFormatvips_image_guess_format ()
VipsCodingvips_image_get_coding ()
VipsInterpretationvips_image_get_interpretation ()
VipsInterpretationvips_image_guess_interpretation ()
doublevips_image_get_xres ()
doublevips_image_get_yres ()
intvips_image_get_xoffset ()
intvips_image_get_yoffset ()
constchar *vips_image_get_filename ()
constchar *vips_image_get_mode ()
doublevips_image_get_scale ()
doublevips_image_get_offset ()
intvips_image_get_page_height ()
intvips_image_get_n_pages ()
intvips_image_get_n_subifds ()
intvips_image_get_orientation ()
gbooleanvips_image_get_orientation_swap ()
intvips_image_get_concurrency ()
constvoid *vips_image_get_data ()
voidvips_image_init_fields ()
voidvips_image_set ()
intvips_image_get ()
intvips_image_get_as_string ()
GTypevips_image_get_typeof ()
gbooleanvips_image_remove ()
void *(*VipsImageMapFn) ()
void *vips_image_map ()
gchar **vips_image_get_fields ()
voidvips_image_set_area ()
intvips_image_get_area ()
voidvips_image_set_blob ()
voidvips_image_set_blob_copy ()
intvips_image_get_blob ()
intvips_image_get_int ()
voidvips_image_set_int ()
intvips_image_get_double ()
voidvips_image_set_double ()
intvips_image_get_string ()
voidvips_image_set_string ()
voidvips_image_print_field ()
intvips_image_get_image ()
voidvips_image_set_image ()
voidvips_image_set_array_int ()
intvips_image_get_array_int ()
intvips_image_get_array_double ()
voidvips_image_set_array_double ()
intvips_image_history_printf ()
intvips_image_history_args ()
constchar *vips_image_get_history ()

Types and Values

#defineVIPS_META_EXIF_NAME
#defineVIPS_META_XMP_NAME
#defineVIPS_META_IPTC_NAME
#defineVIPS_META_PHOTOSHOP_NAME
#defineVIPS_META_ICC_NAME
#defineVIPS_META_IMAGEDESCRIPTION
#defineVIPS_META_RESOLUTION_UNIT
#defineVIPS_META_BITS_PER_SAMPLE
#defineVIPS_META_PALETTE
#defineVIPS_META_LOADER
#defineVIPS_META_SEQUENTIAL
#defineVIPS_META_ORIENTATION
#defineVIPS_META_PAGE_HEIGHT
#defineVIPS_META_N_PAGES
#defineVIPS_META_N_SUBIFDS
#defineVIPS_META_CONCURRENCY

Includes

#include <vips/vips.h>

Description

These functions let you get at image header data (including metadata) in auniform way.

Usevips_image_get_typeof() to test for theexistence andGType of a header field.

You can attach arbitrary metadata to images. Metadata is copied as imagesare processed, so all images which used this image as input, directly orindirectly, will have this same bit of metadata attached to them. Copyingis implemented with reference-counted pointers, so it is efficient, even forlarge items of data. This does however mean that metadata items need to beimmutable. Metadata is handy for things like ICC profiles or EXIF data.

Various convenience functions (eg.vips_image_set_int()) let you easilyattachsimple types likenumbers, strings and memory blocks to images. Usevips_image_map() to loopover an image's fields, including all metadata.

Items of metadata are identified by strings. Some strings are reserved, forexample 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, seebelow) is automatically saved for you in a block of XML at the end of thefile. When you load a VIPS image, the metadata is restored. You can use thevipsedit command-line tool to extract or replace this block of XML.

VIPS metadata is based onGValue. See the docs for that system if you wantto do fancy stuff such as defining a new metadata type.VIPS defines a newGValue calledvips_save_string, a variety of string,seevips_value_set_save_string().If yourGValue can be transformed tovips_save_string, it will besaved and loaded to and from VIPS files for you.

VIPS provides a couple of base classes which implementreference-counted areas of memory. If you base your metadata on one ofthese types, it can be copied between images efficiently.

Functions

vips_format_sizeof ()

guint64vips_format_sizeof (VipsBandFormat format);

Parameters

format

format type

 

Returns

number of bytes for a band format.


vips_format_sizeof_unsafe ()

guint64vips_format_sizeof_unsafe (VipsBandFormat format);

A fast but dangerous version ofvips_format_sizeof(). You must havepreviously range-checkedformat or you'll crash.

[skip]

Parameters

format

format type

 

Returns

number of bytes for a band format.


vips_interpretation_max_alpha ()

doublevips_interpretation_max_alpha (VipsInterpretation interpretation);

Parameters

interpretation

image interpretation

 

Returns

the maximum alpha value for an interpretation.


vips_image_get_width ()

intvips_image_get_width (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the number of pixels across the image.


vips_image_get_height ()

intvips_image_get_height (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the number of pixels down the image.


vips_image_get_bands ()

intvips_image_get_bands (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the number of bands (channels) in the image.


vips_image_get_format ()

VipsBandFormatvips_image_get_format (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the format of each band element.


vips_image_get_format_max ()

doublevips_image_get_format_max (VipsBandFormat format);

Parameters

format

the format

 

Returns

the maximum numeric value possible for this format.


vips_image_guess_format ()

VipsBandFormatvips_image_guess_format (constVipsImage *image);

Return theVipsBandFormat for an image, guessing a sane value ifthe set value looks crazy.

For example, for a float image tagged as rgb16, we'd return ushort.

Parameters

image

image to guess for

 

Returns

a sensibleVipsBandFormat for the image.


vips_image_get_coding ()

VipsCodingvips_image_get_coding (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the image coding


vips_image_get_interpretation ()

VipsInterpretationvips_image_get_interpretation (constVipsImage *image);

Return theVipsInterpretation set in the image header.Usevips_image_guess_interpretation() if you want a sanity-checked value.

Parameters

image

image to get from

 

Returns

theVipsInterpretation from the image header.


vips_image_guess_interpretation ()

VipsInterpretationvips_image_guess_interpretation (constVipsImage *image);

Return theVipsInterpretation for an image, guessing a sane value ifthe set value looks crazy.

Parameters

image

image to guess for

 

Returns

a sensibleVipsInterpretation for the image.


vips_image_get_xres ()

doublevips_image_get_xres (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the horizontal image resolution in pixels per millimeter.


vips_image_get_yres ()

doublevips_image_get_yres (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the vertical image resolution in pixels per millimeter.


vips_image_get_xoffset ()

intvips_image_get_xoffset (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the horizontal position of the image origin, in pixels.


vips_image_get_yoffset ()

intvips_image_get_yoffset (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the vertical position of the image origin, in pixels.


vips_image_get_filename ()

constchar *vips_image_get_filename (constVipsImage *image);

Parameters

image

image to get from

 

Returns

the name of the file the image was loaded from, or NULL if thereis no filename.


vips_image_get_mode ()

constchar *vips_image_get_mode (constVipsImage *image);

Image modes are things like"t", meaning a memory buffer, and"p"meaning a delayed computation.

Parameters

image

image to get from

 

Returns

the image mode.


vips_image_get_scale ()

doublevips_image_get_scale (constVipsImage *image);

Matrix images can have an optionalscale field for use by integerconvolution.

Parameters

image

image to get from

 

Returns

the scale.


vips_image_get_offset ()

doublevips_image_get_offset (constVipsImage *image);

Matrix images can have an optionaloffset field for use by integerconvolution.

Parameters

image

image to get from

 

Returns

the offset.


vips_image_get_page_height ()

intvips_image_get_page_height (VipsImage *image);

Multi-page images can have a page height. Fetch it, and sanity check it. Ifpage-height is not set, it defaults to the image height.

Parameters

image

image to get from

 

Returns

the page height.


vips_image_get_n_pages ()

intvips_image_get_n_pages (VipsImage *image);

Fetch and sanity-checkVIPS_META_N_PAGES. Default to 1 if not present orcrazy.

This is the number of pages in the image file, not the number of pages thathave been loaded intoimage.

Parameters

image

image to get from

 

Returns

the number of pages in the image file


vips_image_get_n_subifds ()

intvips_image_get_n_subifds (VipsImage *image);

Fetch and sanity-checkVIPS_META_N_SUBIFDS. Default to 0 if not present orcrazy.

Parameters

image

image to get from

 

Returns

the number of subifds in the image file


vips_image_get_orientation ()

intvips_image_get_orientation (VipsImage *image);

Fetch and sanity-checkVIPS_META_ORIENTATION. Default to 1 (no rotate,no flip) if not present or crazy.

Parameters

image

image to get from

 

Returns

the image orientation.


vips_image_get_orientation_swap ()

gbooleanvips_image_get_orientation_swap (VipsImage *image);

ReturnTRUE if applying the orientation would swap width and height.

Parameters

image

image to get from

 

Returns

if width/height will swap


vips_image_get_concurrency ()

intvips_image_get_concurrency (VipsImage *image,int default_concurrency);

Fetch and sanity-checkVIPS_CONCURRENCY. Default to 1 if not present orcrazy.

Parameters

image

image to get from

 

Returns

the suggested concurrency for this image


vips_image_get_data ()

constvoid *vips_image_get_data (VipsImage *image);

Return a pointer to the image's pixel data, if possible. This can involveallocating large amounts of memory and performing a long computation. Imagepixels are laid out in band-packed rows.

Since this function modifiesimage, it is not threadsafe. Only call it onimages which you are sure have not been shared with another thread.

See also:vips_image_wio_input(),vips_image_copy_memory().

Parameters

image

image to get data for

 

Returns

a pointer to pixel data, if possible.

[transfer none]


vips_image_init_fields ()

voidvips_image_init_fields (VipsImage *image,int xsize,int ysize,int bands,VipsBandFormat format,VipsCoding coding,VipsInterpretation interpretation,double xres,double yres);

A convenience function to set the header fields after creating an image.Normally you copy the fields from your input images withvips_image_pipelinev() and then makeany adjustments you need, but if you are creating an image from scratch,for examplevips_black() orvips_jpegload(), you do need to set all thefields yourself.

See also:vips_image_pipelinev().

Parameters

image

image to init

 

xsize

image width

 

ysize

image height

 

bands

image bands

 

format

band format

 

coding

image coding

 

interpretation

image type

 

xres

horizontal resolution, pixels per millimetre

 

yres

vertical resolution, pixels per millimetre

 

vips_image_set ()

voidvips_image_set (VipsImage *image,constchar *name,GValue *value);

Set a piece of metadata onimage. Any old metadata with that name isdestroyed. TheGValue is copied into the image, so you need to unset thevalue when you're done with it.

For example, to set an integer on an image (though you would use theconvenience functionvips_image_set_int() in practice), you would do:

123456
GValuevalue=G_VALUE_INIT;g_value_init(&value,G_TYPE_INT);g_value_set_int(&value,42);vips_image_set(image,name,&value);g_value_unset(&value);

See also:vips_image_get().

Parameters

image

image to set the metadata on

 

name

the name to give the metadata

 

value

theGValue to copy into the image

 

vips_image_get ()

intvips_image_get (constVipsImage *image,constchar *name,GValue *value_copy);

Fillvalue_copy with a copy of the header field.value_copy must be zeroedbut uninitialised.

This will return -1 and add a message to the error buffer if the fielddoes not exist. Usevips_image_get_typeof() to test for theexistence of a field first if you are not certain it will be there.

For example, to read a double from an image (though of course you would usevips_image_get_double() in practice):

1234567891011121314151617
GValuevalue=G_VALUE_INIT;doubled;if(vips_image_get(image,name,&value))return-1;if(G_VALUE_TYPE(&value)!=G_TYPE_DOUBLE){vips_error("mydomain",_("field\"%s\" is of type %s, not double"),name,g_type_name(G_VALUE_TYPE(&value)));g_value_unset(&value);return-1;}d=g_value_get_double(&value);g_value_unset(&value);

See also:vips_image_get_typeof(),vips_image_get_double().

Parameters

image

image to get the field from from

 

name

the name to fetch

 

value_copy

theGValue is copied into this.

[transfer full][out caller-allocates]

Returns

0 on success, -1 otherwise.

[skip]


vips_image_get_as_string ()

intvips_image_get_as_string (constVipsImage *image,constchar *name,char **out);

Returnsname fromimage inout.This function will read any field, returning it as a printable string.You need to free the string withg_free() when you are done with it.

This will base64-encode BLOBs, for example. Usevips_buf_appendgv() tomake a string that's for humans.

See also:vips_image_get(),vips_image_get_typeof(),vips_buf_appendgv().

Parameters

image

image to get the header field from

 

name

field name

 

out

return field value as string.

[out][transfer full]

Returns

0 on success, -1 otherwise.


vips_image_get_typeof ()

GTypevips_image_get_typeof (constVipsImage *image,constchar *name);

Read theGType for a header field. Returns zero if there is nofield of that name.

See also:vips_image_get().

Parameters

image

image to test

 

name

the name to search for

 

Returns

theGType of the field, or zero if there is nofield of that name.


vips_image_remove ()

gbooleanvips_image_remove (VipsImage *image,constchar *name);

Find and remove an item of metadata. ReturnFALSE if no metadata of thatname was found.

See also:vips_image_set(),vips_image_get_typeof().

Parameters

image

image to test

 

name

the name to search for

 

Returns

TRUE if an item of metadata of that name was found and removed


VipsImageMapFn ()

void *(*VipsImageMapFn) (VipsImage *image,constchar *name,GValue *value,void *a);

vips_image_map ()

void *vips_image_map (VipsImage *image,VipsImageMapFn fn,void *a);

This function callsfn for every header field, including every item ofmetadata.

Like all _map functions, the user function should returnNULL to continueiteration, or a non-NULL pointer to indicate early termination.

See also:vips_image_get_typeof(),vips_image_get().

Parameters

image

image to map over

 

fn

function to call for each header field.

[scope call]

a

user data for function.

[closure fn]

Returns

NULL on success, the failing pointer otherwise.

[transfer none]


vips_image_get_fields ()

gchar **vips_image_get_fields (VipsImage *image);

Get aNULL-terminated array listing all the metadata field names onimage.Free the return result withg_strfreev().

This is handy for language bindings. From C, it's usually more convenient tousevips_image_map().

Parameters

image

image to get fields from

 

Returns

metadata fields in image, as aNULL-terminatedarray.

[transfer full]


vips_image_set_area ()

voidvips_image_set_area (VipsImage *image,constchar *name,VipsCallbackFn free_fn,void *data);

Attachesdata as a metadata item onimage under the namename. WhenVIPS no longer needs the metadata, it will be freed withfree_fn.

See also:vips_image_get_double(),vips_image_set()

Parameters

image

image to attach the metadata to

 

name

metadata name

 

free_fn

free function fordata.

[scope async][nullable]

data

pointer to area of memory.

[transfer full]

vips_image_get_area ()

intvips_image_get_area (constVipsImage *image,constchar *name,constvoid **data);

Getsdata fromimage under the namename. A conveniencefunction overvips_image_get(). Usevips_image_get_typeof() to test forthe existence of a piece of metadata.

See also:vips_image_set_area(),vips_image_get(),vips_image_get_typeof()

Parameters

image

image to get the metadata from

 

name

metadata name

 

data

return metadata value.

[out]

Returns

0 on success, -1 otherwise.


vips_image_set_blob ()

voidvips_image_set_blob (VipsImage *image,constchar *name,VipsCallbackFn free_fn,constvoid *data,size_t length);

Attachesdata as a metadata item onimage under the namename.

See also:vips_image_get_blob(),vips_image_set().

Parameters

image

image to attach the metadata to

 

name

metadata name

 

free_fn

free function fordata.

[scope async][nullable]

data

pointer to area ofmemory.

[array length=length][element-type guint8][transfer full]

length

length of memory area

 

vips_image_set_blob_copy ()

voidvips_image_set_blob_copy (VipsImage *image,constchar *name,constvoid *data,size_t length);

Attachesdata as a metadata item onimage under the namename, takinga copy of the memory area.

See also:vips_image_get_blob(),vips_image_set().

Parameters

image

image to attach the metadata to

 

name

metadata name

 

data

pointer to area of memory.

[array length=length][element-type guint8]

length

length of memory area

 

vips_image_get_blob ()

intvips_image_get_blob (constVipsImage *image,constchar *name,constvoid **data,size_t *length);

Getsdata fromimage under the namename, optionally returns itslength inlength. Usevips_image_get_typeof() to test for the existenceof a piece of metadata.

See also:vips_image_get(),vips_image_get_typeof(),vips_blob_get(),

Parameters

image

image to get the metadata from

 

name

metadata name

 

data

pointer to area of memory.

[out][array length=length][element-type guint8]

length

return the blob length here, optionally.

[out]

Returns

0 on success, -1 otherwise.


vips_image_get_int ()

intvips_image_get_int (constVipsImage *image,constchar *name,int *out);

Getsout fromim under the namename.The value will be transformed intoan int, if possible.

See also:vips_image_get(),vips_image_get_typeof()

Parameters

image

image to get the header field from

 

name

field name

 

out

return field value.

[out]

Returns

0 on success, -1 otherwise.


vips_image_set_int ()

voidvips_image_set_int (VipsImage *image,constchar *name,int i);

Attachesi as a metadata item onimage under the namename. Aconveniencefunction overvips_image_set().

See also:vips_image_get_int(),vips_image_set()

Parameters

image

image to attach the metadata to

 

name

metadata name

 

i

metadata value

 

vips_image_get_double ()

intvips_image_get_double (constVipsImage *image,constchar *name,double *out);

Getsout fromim under the namename.The value will be transformed intoa double, if possible.

See also:vips_image_get(),vips_image_get_typeof()

Parameters

image

image to get the header field from

 

name

field name

 

out

return field value.

[out]

Returns

0 on success, -1 otherwise.


vips_image_set_double ()

voidvips_image_set_double (VipsImage *image,constchar *name,double d);

Attachesd as a metadata item onimage asname. Aconveniencefunction overvips_image_set().

See also:vips_image_get_double(),vips_image_set()

Parameters

image

image to attach the metadata to

 

name

metadata name

 

d

metadata value

 

vips_image_get_string ()

intvips_image_get_string (constVipsImage *image,constchar *name,constchar **out);

Getsout fromim under the namename.The field must be of typeG_TYPE_STRING, VIPS_TYPE_REF_STRING.

Do not freeout.

Usevips_image_get_as_string() to fetch any field as a string.

See also:vips_image_get(),vips_image_get_typeof()

Parameters

image

image to get the header field from

 

name

field name

 

out

return field value.

[out][transfer none]

Returns

0 on success, -1 otherwise.


vips_image_set_string ()

voidvips_image_set_string (VipsImage *image,constchar *name,constchar *str);

Attachesstr as a metadata item onimage asname.A conveniencefunction overvips_image_set() usingVIPS_TYPE_REF_STRING.

See also:vips_image_get_double(),vips_image_set().

Parameters

image

image to attach the metadata to

 

name

metadata name

 

str

metadata value

 

vips_image_print_field ()

voidvips_image_print_field (constVipsImage *image,constchar *name);

Prints fieldname to stdout as ASCII. Handy for debugging.

Parameters

image

image to get the header field from

 

name

field name

 

vips_image_get_image ()

intvips_image_get_image (constVipsImage *image,constchar *name,VipsImage **out);

Getsout fromim under the namename.The field must be of typeVIPS_TYPE_IMAGE. You must unrefout withg_object_unref().

Usevips_image_get_typeof() to test for theexistence of a piece of metadata.

See also:vips_image_get(),vips_image_set_image()

Parameters

image

image to get the metadata from

 

name

metadata name

 

out

return metadata value.

[out][transfer full]

Returns

0 on success, -1 otherwise.


vips_image_set_image ()

voidvips_image_set_image (VipsImage *image,constchar *name,VipsImage *im);

Attachesim as a metadata item onimage asname.A convenience function overvips_image_set().

See also:vips_image_get_image(),vips_image_set().

Parameters

image

image to attach the metadata to

 

name

metadata name

 

im

metadata value

 

vips_image_set_array_int ()

voidvips_image_set_array_int (VipsImage *image,constchar *name,constint *array,int n);

Attachesarray as a metadata item onimage asname.A convenience function overvips_image_set().

See also:vips_image_get_image(),vips_image_set().

Parameters

image

image to attach the metadata to

 

name

metadata name

 

array

array of ints.

[array length=n][allow-none]

n

the number of elements

 

vips_image_get_array_int ()

intvips_image_get_array_int (VipsImage *image,constchar *name,int **out,int *n);

Getsout fromim under the namename.The field must be of typeVIPS_TYPE_ARRAY_INT.

Do not freeout.out is valid as long asimage is valid.

Usevips_image_get_typeof() to test for theexistence of a piece of metadata.

See also:vips_image_get(),vips_image_set_image()

Parameters

image

image to get the metadata from

 

name

metadata name

 

out

return pointer to array.

[out][array length=n][transfer none]

n

return the number of elements here, optionally.

[out][optional]

Returns

0 on success, -1 otherwise.


vips_image_get_array_double ()

intvips_image_get_array_double (VipsImage *image,constchar *name,double **out,int *n);

Getsout fromim under the namename.The field must be of typeVIPS_TYPE_ARRAY_INT.

Do not freeout.out is valid as long asimage is valid.

Usevips_image_get_typeof() to test for theexistence of a piece of metadata.

See also:vips_image_get(),vips_image_set_image()

Parameters

image

image to get the metadata from

 

name

metadata name

 

out

return pointer to array.

[out][array length=n][transfer none]

n

return the number of elements here, optionally.

[out][optional]

Returns

0 on success, -1 otherwise.


vips_image_set_array_double ()

voidvips_image_set_array_double (VipsImage *image,constchar *name,constdouble *array,int n);

Attachesarray as a metadata item onimage asname.A convenience function overvips_image_set().

See also:vips_image_get_image(),vips_image_set().

Parameters

image

image to attach the metadata to

 

name

metadata name

 

array

array of doubles.

[array length=n][allow-none]

n

the number of elements

 

vips_image_history_printf ()

intvips_image_history_printf (VipsImage *image,constchar *format,...);

Add a line to the image history. Theformat and arguments are expanded, thedate and time is appended prefixed with a hash character, and the wholestring is appended to the image history and terminated with a newline.

For example:

12
vips_image_history_printf(image,"vips invert %s %s",in->filename,out->filename);

Might add the string

1
"vips invert /home/john/fred.v /home/john/jim.v # Fri Apr 3 23:30:35 2009\n"

VIPS operations don't add history lines for you because a single action atthe application level might involve many VIPS operations. History must berecorded by the application.

Parameters

image

add history line to this image

 

format

printf() format string

 

...

arguments to format string

 

Returns

0 on success, -1 on error.


vips_image_history_args ()

intvips_image_history_args (VipsImage *image,constchar *name,int argc,char *argv[]);

Formats the name/argv as a single string and callsvips_image_history_printf(). Aconvenience function for command-line prorams.

See also:vips_image_get_history().

Parameters

image

image to attach history line to

 

name

program name

 

argc

number of program arguments

 

argv

program arguments.

[array length=argc][element-type char*]

Returns

0 on success, -1 on error.


vips_image_get_history ()

constchar *vips_image_get_history (VipsImage *image);

This function reads the image history as a C string. The string is ownedby VIPS and must not be freed.

VIPS tracks the history of each image, that is, the sequence of operationsthat generated that image. Applications built on VIPS need to callvips_image_history_printf() for each action they perform, setting thecommand-line equivalent for the action.

See also:vips_image_history_printf().

Parameters

image

get history from here

 

Returns

The history ofimageas a C string. Do not free!.

[transfer none]

Types and Values

VIPS_META_EXIF_NAME

#define VIPS_META_EXIF_NAME "exif-data"

The name that 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'sTIFFTAG_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 writeoperations for TIFF, JPEG, PNG and others use this item of metadata toattach and save ICC profiles. The profile is updated by thevips_icc_transform() operations.


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 thefile's preferred unit for resolution.


VIPS_META_BITS_PER_SAMPLE

#define VIPS_META_BITS_PER_SAMPLE "bits-per-sample"

The bits per sample for each channel.


VIPS_META_PALETTE

#define VIPS_META_PALETTE "palette"

Does this image have a palette?


VIPS_META_LOADER

#define VIPS_META_LOADER "vips-loader"

Record the name of the original loader here. Handy for hinting file formatsand for debugging.


VIPS_META_SEQUENTIAL

#define VIPS_META_SEQUENTIAL "vips-sequential"

Images loaded viavips_sequential() have this int field defined. Someoperations (eg.vips_shrinkv()) add extra caches if they see it on theirinput.


VIPS_META_ORIENTATION

#define VIPS_META_ORIENTATION "orientation"

The orientation tag for this image. An int from 1 - 8 using the standardexif/tiff meanings.

  • 1 - The 0th row represents the visual top of the image, and the 0th columnrepresents the visual left-hand side.

  • 2 - The 0th row represents the visual top of the image, and the 0th columnrepresents the visual right-hand side.

  • 3 - The 0th row represents the visual bottom of the image, and the 0thcolumn represents the visual right-hand side.

  • 4 - The 0th row represents the visual bottom of the image, and the 0thcolumn represents the visual left-hand side.

  • 5 - The 0th row represents the visual left-hand side of the image, and the0th column represents the visual top.

  • 6 - The 0th row represents the visual right-hand side of the image, and the0th column represents the visual top.

  • 7 - The 0th row represents the visual right-hand side of the image, and the0th column represents the visual bottom.

  • 8 - The 0th row represents the visual left-hand side of the image, and the0th column represents the visual bottom.


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 animage with "page-height" set to a format that supports multiple pages, suchas tiff, the image will be saved as a series of pages.


VIPS_META_N_PAGES

#define VIPS_META_N_PAGES "n-pages"

If set, the number of pages in the original file.


VIPS_META_N_SUBIFDS

#define VIPS_META_N_SUBIFDS "n-subifds"

If set, the number of subifds in the first page of the file.


VIPS_META_CONCURRENCY

#define VIPS_META_CONCURRENCY "concurrency"

If set, the suggested concurrency for this image.

See Also

type

Generated by GTK-Doc V1.34.0

[8]ページ先頭

©2009-2025 Movatter.jp