Rmagick get date picture taken

I want to make a program to rename pictures based on the date and time
they were taken. How do I get the date (and time) a picture was taken?

On 9/4/07, Jonathan D. [email protected] wrote:

I want to make a program to rename pictures based on the date and time
they were taken. How do I get the date (and time) a picture was taken?

Unless the camera you were using has support for Exif metadata tags
and has been properly set up to generate them you’re basically SOL. If
your camera has such tagging enabled, apparently RMagick has support
for reading Exif tags if they’re present, and there’s another library:

http://rubyforge.org/projects/exifr

capable of reading this data if it exists.

Dido S. wrote:

On 9/4/07, Jonathan D. [email protected] wrote:

I want to make a program to rename pictures based on the date and time
they were taken. How do I get the date (and time) a picture was taken?

Unless the camera you were using has support for Exif metadata tags
and has been properly set up to generate them you’re basically SOL. If
your camera has such tagging enabled, apparently RMagick has support
for reading Exif tags if they’re present, and there’s another library:

http://rubyforge.org/projects/exifr

capable of reading this data if it exists.

Yes, the data is there. I just want to know what method to use to
access it in Ruby. The Rmagick documentation is just not very helpful
on that.

I think I will try exifr, it looks like it will probably be easier to
use.

thanks

Jonathan D. wrote:

I want to make a program to rename pictures based on the date and time
they were taken. How do I get the date (and time) a picture was taken?

http://www.simplesystems.org/RMagick/doc/image2.html#get_exif_by_entry

Tim H. wrote:

Jonathan D. wrote:

I want to make a program to rename pictures based on the date and time
they were taken. How do I get the date (and time) a picture was taken?

http://www.simplesystems.org/RMagick/doc/image2.html#get_exif_by_entry

Thankee, just what I was looking for :smiley:

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