Image.Xmp (image v0.66.0)

Copy Markdown View Source

Functions to extract and interpret image XMP data.

Summary

Functions

Extracts an XMP metadata blob into an Elixir map.

Functions

extract_xmp(xmp)

@spec extract_xmp(binary() | tuple()) :: map()

Extracts an XMP metadata blob into an Elixir map.

Arguments

  • xmp is either the raw XMP XML payload as a string, or a parsed SweetXml xml element. This is the form libvips returns from Vix.Vips.Image.header_value(image, "xmp-data").

Returns

  • A map keyed by atom field names (:artist, :keywords, :created_at, :rating, …) with the parsed values.