Ruby-exiv2 \?

I’m trying to use ruby-exiv2, the ruby bindings to the Exiv2 image
metadata library. The docs are really sparse, though. In fact, this is

Basic usage:

gem install RubyInline
gem install ruby-exiv2
irb -r rubygems

     require 'exiv2'
     @img ="a.jpg")
     puts @img["Exif.Photo.PixelXDimension"]
     @img["Exif.Photo.PixelXDimension"] = 2048

Version 1.3 introduces dynamic accessors:

 require 'exiv2'
 @img ="a.jpg")
 puts @img.Exif.Photo.PixelXDimension
     @img.Exif.Photo.PixelXDimension = 2048

There’s a list of tags in the exiv2 website (DateTimeOriginal, etc). But
I’d really like to be able to make the ‘img’ object (to use the above
example) give me a list of keys (or key-like tags) so I know what’s
available (especially since not all images will have the same tags–for
example, some will and some won’t have gps coordinates embedded).

Does anyone have any experience with ruby-exiv2? I couldn’t find a
list for it…


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs