Vips.Image.set

### Method

# Vips Imageset

#### 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

`vips_image_get()`.

#### Parameters

`name`

  Type: `const char*`

  The name to give the metadata.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`value`

  Type: `GValue`

  The `GValue` to copy into the image.

  The data is owned by the caller of the method.