[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-exiv2 \?

Paul Archer

4/12/2009 1:57:00 AM

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