Project

exempi

0.0
No commit activity in last 3 years
No release in over 3 years
Exempi is a thin FFI-based wrapper around the Exempi library. It provides a variety of functions for reading, writing, and manipulating XMP metadata.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.9.2.2

Runtime

>= 1.1.5
 Project Readme

Exempi

Exempi is an ultra-thin FFI-based wrapper for the Exempi C library. It wraps Exempi's functions in the Exempi module.

Don't like dealing with C functions directly? Check out Fasttrack, an object-oriented wrapper around Exempi.

Installation

Add this line to your application's Gemfile:

gem 'exempi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install exempi

Usage samples

Opening a file:

# create an empty file pointer
file_ptr = Exempi.xmp_files_new
Exempi.xmp_files_open file_ptr, "myfile.jpg", :XMP_OPEN_READ

Extracting XMP from a file:

xmp_ptr = Exempi.files_get_new_xmp file_ptr

Fetching an XMP property from a file:

# Exempi provides a set of standard namespace URIs for you
exif_ns = Exempi::Namespaces::XMP_NS_EXIF
xmp_string = Exempi.xmp_string_new

Exempi.xmp_get_property xmp_ptr, exif_ns, 'DateTimeOriginal', xmp_string
datetime = Exempi.xmp_string_cstr xmp_string
Exempi.xmp_string_free xmp_string

For more information see Exempi's function documentation, included in lib/exempi/exempi.rb.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

3-clause BSD, identical to the license used by Exempi and Adobe XMP Toolkit. For the license text, see LICENSE.