### Method

# GExiv2 Metadata get_comment

unstable since: 0.16.0

#### Declaration [src]

    gchar*
    gexiv2_metadata_get_comment (
      GExiv2Metadata* self
      GError** error
    )

#### Description [src]

A composite accessor that uses the first available metadata field from a list of well-known locations to find the photo’s comment (or description).

MWG guidelines refer to these as Description: a textual description of a resource’s content.

These fields are:

- Exif.Image.ImageDescription (MWG Guidelines)
- Exif.Photo.UserComment
- Exif.Image.XPComment
- Iptc.Application2.Caption (MWG Guidelines)
- Xmp.dc.description (MWG Guidelines)
- Xmp.acdsee.notes (Commonly requested, read only)

Note that in the EXIF specification Exif.Image.ImageDescription is described as “the title of the image”. Also, it does not support two-byte character codes for encoding. However, it’s still used here for legacy reasons.

For fine-grained control, it’s recommended to use Exiv2 tags directly rather than this method, which is more useful for quick or casual use.

Available since: 0.16.0

#### Return value

Type: `gchar*`

The photo’s comment field.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.