Method
VipsImageimage_set
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 = 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