Method
VipsImageset
Declaration [src]
void
vips_image_set (
VipsImage* image,
const char* name,
GValue* value
)
Description [src]
Set a piece of metadata on image
. Any old metadata with that name is
destroyed. The %GValue is copied into the image, so you need to unset the
value when you’re done with it.
For example, to set an integer on an image (though you would use the
convenience function vips_image_set_int()
in practice), you would do:
GValue value = { 0 };
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
name |
const char* |
The name to give the metadata. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
value |
GValue |
The %GValue to copy into the image. |
|
The data is owned by the caller of the function. |