Vips.Image.get_as_string

### Method

# Vips Imageget_as_string

#### Declaration [src]

    int
    vips_image_get_as_string (
      const VipsImage* image,
      const char* name,
      char** out
    )

#### Description [src]

Returns `name` from `image` in `out`. This function will read any field, returning it as a printable string. You need to free the string with `g_free()` when you are done with it.

This will base64-encode BLOBs, for example. Use `vips_buf_appendg()` to make a string that’s for humans.

See also

`vips_image_get()`, `vips_image_get_typeof()`, `vips_buf_appendg()`.

#### Parameters

`name`

  Type: `const char*`

  Field name.

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

`out`

  Type: `char**`

  Return field value as string.

  The argument will be set by the function.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `int`

0 on success, -1 otherwise.