ruby-exiv2 \?

P

Paul Archer

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 it:

Basic usage:
gem install RubyInline
gem install ruby-exiv2
irb -r rubygems

require 'exiv2'
@img = Exiv2::Image.new("a.jpg")
puts @img["Exif.Photo.PixelXDimension"]
@img["Exif.Photo.PixelXDimension"] = 2048
@img.save

Version 1.3 introduces dynamic accessors:

require 'exiv2'
@img = Exiv2::Image.new("a.jpg")
puts @img.Exif.Photo.PixelXDimension
@img.Exif.Photo.PixelXDimension = 2048
@img.save


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 mailing
list for it...

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top