# Exifr - Ruby EXIF reading library

**URL:** <https://www.ruby-forum.com/t/exifr-ruby-exif-reading-library/159378>\
**Category:** Ruby\
**Created:** [February 4, 2009, 12:03am UTC](https://www.ruby-forum.com/t/exifr-ruby-exif-reading-library/159378 "2009-02-04T00:03:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjohn\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Post date:** [February 4, 2009, 12:03am UTC](https://www.ruby-forum.com/t/exifr-ruby-exif-reading-library/159378/1 "2009-02-04T00:03:59Z")

</div>

I’ve just made use of the EXIFR library. The docs are here:

[http://exifr.rubyforge.org/api/index.html](http://exifr.rubyforge.org/api/index.html)

It’s splendid, and highly recommended as absolutely as simple as can be,  
but completely effective. Thank you very much “R.W. van ‘t Veer”. I  
particularly like that it’s (I assume?) pure ruby. It certainly didn’t  
seem to do anything unusual during:

sudo gem install exifr

Why do I need this? I’ve just got 550 photos back from an online  
printing outfit, but to my dismay, they have stopped labelling the back  
of prints with photo’s capture time (from EXIF meta-data). All they have  
now is the completely arbitrary filename.

No matter! EXIFR to the rescue! A quick script in irb along the lines  
of:

f = Dir.glob(‘\*.jpg’)  
table = f.map {|file\_name| [file\_name,  
EXIFR::JPEG.new(file\_name).exif.date\_time\_original]}  
table.each {|name, date| puts “#{name} #{date}”}; nil

And I’ve got a nice ASCII table from which I can quite quickly label the  
photos by hand. Hopefully by a nice warm fire with a cup of cocoa.

All the best,  
Benjohn

---

<div class="post-metadata">

**Author:** ![Benjohn\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Post date:** [February 4, 2009, 10:14am UTC](https://www.ruby-forum.com/t/exifr-ruby-exif-reading-library/159378/2 "2009-02-04T10:14:11Z")

</div>

In article [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
Benjohn B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve just made use of the EXIFR library. The docs are here:
> 
> [http://exifr.rubyforge.org/api/index.html](http://exifr.rubyforge.org/api/index.html)
> 
> It’s splendid, and highly recommended as absolutely as simple as can be,  
> but completely effective. Thank you very much “R.W. van ‘t Veer”. I

What about using mini\_exiftool? Apart from the fact that it is just a  
wrapper  
around the splendid exiftool (unfortunately in Perl), it is read/write  
and  
support far more file formats (especially RAW ones)…

---

<div class="post-metadata">

**Author:** ![Benjohn\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Post date:** [February 4, 2009, 3:47pm UTC](https://www.ruby-forum.com/t/exifr-ruby-exif-reading-library/159378/3 "2009-02-04T15:47:32Z")

</div>

> wrapper  
> around the splendid exiftool (unfortunately in Perl), it is read/write and  
> support far more file formats (especially RAW ones)…

Well, I didn’t need any of that 🙂 I’m sure the tool you mention is  
also  
marvelous though.

The fact that EXIFR is (I think) pure Ruby means that it will work  
anywhere where Ruby will work. It’s just some Ruby code. It doesn’t need  
libraries installed, or native code compiled (for the right distribution  
of Ruby that you have installed), or anything else that might become a  
hurdle to trying to get something amazingly simple done.

🙂 In case it’s of any interest… Of late I’ve realised that the  
frustrations I have as a software engineer are all about what I think  
Fred  
Brooks called Accidental Complexity in The Mythical Man Month.

Take wanting to write a simple game using simple graphics. This just  
should not be hard. The Gosu library manages to make it easy. Hooray!  
[Although it could still be easier to get simple graphics on the  
screen].  
You install the binary package, and it works.

Other combinations of language and library that I’ve tried have always  
involved installing some packages, probably compiling something, and  
during this process, something allways seems to go wrong. This isn’t  
stuff  
that I’m especially good at sorting out, or want to sort out.

I think that in our industry, almost all of what people do day to day is  
because of accidental complexity. Very little of it is really about the  
underlying problem being hard.

Cheers,  
Benjohn
