EXIF Library

The call is correct. I think you forgot to require exifr (and
rubygems);

require ‘rubygems’
require ‘exifr’

puts EXIFR::JPEG.new("/file/is/here/tests/data/exif.jpg").date_time

HTH,
Remco

I will not implement any vendor specific decoding in the near future.

12 34 wrote:

Remco van 't Veer wrote:

Please try EXIFR, http://rubyforge.org/projects/exifr

Can this be expanded to support RAW images? Specifically MRW
(Konica-Minolta)?

Jan F. wrote:

12 34 wrote:

Can this be expanded to support RAW images? Specifically MRW
(Konica-Minolta)?
Maybe you can use MiniExiftool (http://miniexiftool.rubyforge.org/) wich
can handle (read and write) meta-data of many file formats inclusive
raw-formats such as MRW. :slight_smile:

regards
Jan

Fantastic. This is what I wanted. I just got back to trying to write my
script after reading a couple of the books. When I got to the EXIF part
I found ExifTool and despair that nothing was available that would
handle MRW using Ruby, until I revisited MiniExifTool. I think in part
the name threw me. This tool is in no way mini.

I’m also finding Ruby easier to write than AppleScript. I could rarely
get anything to work without help. But Ruby syntax is easier to deal
with.

12 34 wrote:

Fantastic. This is what I wanted.
Nice to hear. :slight_smile:

I think in part the name threw me. This tool is in no way mini.
I’ve updated the project description. The “mini” has nothing to do with
the functionality only with the concept of writing only a wrapper to a
command-line application which is a lightweight approach that brings
maximal functionality with minimal work. :slight_smile:

Regards
Jan

12 34 wrote:

PS. While you’re updating, the Perl program is authored by “Phil
Harvey.” Minor typo.
Thanks for the hint. Typos (it was also in the Documentation) fixed.

Regards
Jan

Jan F. wrote:

12 34 wrote:

Fantastic. This is what I wanted.
Nice to hear. :slight_smile:

I think in part the name threw me. This tool is in no way mini.
maximal functionality with minimal work. :slight_smile:

Regards
Jan

Now you’ve got it.

PS. While you’re updating, the Perl program is authored by “Phil
Harvey.” Minor typo.

12 34 wrote:

Newbie here. What’s the syntax to read say the date and time the picture
was taken?

I tried:

puts EXIFR::JPEG.new("/file/is/here/tests/data/exif.jpg").date_time

and got: NameError: uninitialized constant EXIFR

Maybe I didn’t get it installed right?

Thanks for any help.

I got the same error in “rb” file .
but all were OK when run code from ‘irb’ !
Anyone will tell me why?

2008/5/27 frog cgc [email protected]:

Maybe I didn’t get it installed right?

Thanks for any help.

I got the same error in “rb” file .
but all were OK when run code from ‘irb’ !
Anyone will tell me why?

Posted via http://www.ruby-forum.com/.

require ‘rubygems’
require ‘exifr’

p EXIFR::JPEG.new(‘IMG_4061.JPG’).date_time