Title says everything.
How to update EXIF tags of a picture file in Ruby?
Asked Answered
I'm using MiniExiftool, a ruby interface to Perl's Exiftool.
Usage:
exif = MiniExiftool.new(file_path)
exif.date_time_original = Time.now
exif["captionextract"] = "This is my new caption"
exif.save
There is also: https://github.com/janfri/multi_exiftool
I've had success editing existing tags but is there a way to add new ones? –
Superstratum
exif["whatever"] = "Foo" –
Xavierxaviera
if you are looking for just a reader, there is github.com/exiftool-rb/exiftool.rb –
Gasman
Have you tried exifr?
EXIF Reader is a module to read EXIF from JPEG and TIFF images.
Yes I did. It can only read tags but there isn't any writing support. I'm now using a call to the "jhead" tool. –
Anarchist
"exifr" stands for "exif reader" and you didn't answer the question. –
Sculptress
Try ruby-libexif: http://raa.ruby-lang.org/project/ruby-libexif/
Thanks, I had seen this projet but it seems to be dead, all links are broken so I'm unable to install it... –
Anarchist
Oh, that sucks. I'll go ahead and be blasphemous then. Try this: tilloy.net/dev/pyexiv2 –
Perilymph
© 2022 - 2024 — McMap. All rights reserved.