1
12 34
I wanted to list all the EXIF data for a photo. Is there a method for
that? Equivalent to ExifTool:
exiftool -h filepath
Thanks
that? Equivalent to ExifTool:
exiftool -h filepath
Thanks
12 said:I wanted to list all the EXIF data for a photo. Is there a method for
that? Equivalent to ExifTool:
exiftool -h filepath
Thanks
Jan said:12 said:I wanted to list all the EXIF data for a photo. Is there a method for
that? Equivalent to ExifTool:
exiftool -h filepath
Thanks
You should better ask this at rubyforge:
http://rubyforge.org/tracker/?group_id=2912
You can use the method tags, which returns an array of all tags of the
file.
Here a simple example (no HTML output but this shouldn't be difficult to
adapt):
require 'mini_exiftool'
photo = MiniExiftool.new 'file.jpg'
photo.tags.sort.each do |tag|
puts tag + ': ' + photo[tag]
end
Have a look at the API-documentation
http://miniexiftool.rubyforge.org/
and the turorial
http://miniexiftool.rubyforge.org/files/Tutorial.html
Best regards
Jan
Forgot to add that this method is better than the exiftool -h, because12 said:Jan said:require 'mini_exiftool'12 said:I wanted to list all the EXIF data for a photo. Is there a method for
that? Equivalent to ExifTool:
exiftool -h filepath
Thanks
photo = MiniExiftool.new 'file.jpg'
photo.tags.sort.each do |tag|
puts tag + ': ' + photo[tag]
end
Jan
Sorry, my mistake.12 said:I changed one line to
puts "#{tag}: #{photo[tag]}"
since it errored to begin with. Maybe a copying error.
You are learning.I had looked at the docs but I didn't know what to look for (still
don't). I'm not confortable enough with Ruby nomenclature to be able to
figure out I need a method tags and I don't see where'd I'd find that in
the docs and know what it would do.
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.