I'm looking for a gem to use with Rails 3 to extract some basic IPTC metadata from jpeg files (title, caption, ...). I have found ruby-iptc but I have no clue of how to use it having found no documentation or examples. Help anybody?
I use the gem mini_exiftool as a binding for the seperate commandline tool exiftool.exe It can read and change title and IPTC metadata.
require 'mini_exiftool'
# Reading meta data
photo = MiniExiftool.new 'heroes.jpg'
puts photo.title
# Writing meta data
photo = MiniExiftool.new 'heroes.jpg'
photo.title = 'This is the new title'
photo.rating = 20
photo.save
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With