Skip to content
This repository

This library is a wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool/) written by Phil Harvey. You will get the full power of Exiftool to Ruby: Reading and writing of EXIF-data, IPTC-data and XMP-data. Branch master is for actual development and branch compatibility-version is for compatibility with R…

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 COPYING Rakefile for packaging and uploading to rubyforge modified.
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 mini_exiftool.spec
README
= MiniExiftool

This library is wrapper for the Exiftool commandline application (http://www.sno.phy.queensu.ca/~phil/exiftool/) written by Phil Harvay.
Read and write access is done in a clean OO manner.

== Author
Jan Friedrich

== Copyright / License
Copyright (c) 2007 by Jan friedrich

Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1, February 1999

== Examples (for further information and use cases see tests):

 require 'mini_exiftool'
 
 # copy the original test file therewith the original isn't changed
 # and the tests work
 require 'fileutils'
 FileUtils.cp('test/data/test.jpg', './test.jpg')
 
 mini_exiftool = MiniExiftool.new 'test.jpg'
 
 # different methods to read information
 
 mini_exiftool['Orientation'] # ==> 'Horizontal (normal)'
 mini_exiftool['ISO'] # ==> 400
 mini_exiftool['iso'] # ==> 400
 mini_exiftool['DateTimeOriginal'] # ==> Tue Sep 13 20:08:50 +0200 2005 (Time object)
 
 mini_exiftool.orientation # ==> 'Horizontal (normal)'
 mini_exiftool.iso # ==> 400
 mini_exiftool.datetimeoriginal # ==> Tue Sep 13 20:08:50 +0200 2005 (Time object)
 mini_exiftool.date_time_original # ==> Tue Sep 13 20:08:50 +0200 2005 (Time object)
 
 # numerical access
 
 mini_exiftool_num = MiniExiftool.new 'test.jpg', :numerical
 mini_exiftool_num['Orientation'] # ==> 1
 
 
 # write access
 
 mini_exiftool_num['Orientation'] = 2
 mini_exiftool_num['ISO'] = 200
 mini_exiftool_num['Orientation'] # ==> 2
 mini_exiftool_num['ISO'] # ==> 200
 mini_exiftool_num.reload
 mini_exiftool_num['Orientation'] # ==> 1
 mini_exiftool_num['ISO'] # ==> 400
 
 mini_exiftool_num['Orientation'] = 2
 mini_exiftool_num['ISO'] = 200
 mini_exiftool_num.changed? # ==> true
 mini_exiftool_num.changed_tags # ==> ["ISO", "Orientation"]
 mini_exiftool_num.save
 mini_exiftool_num.changed? # ==> false
 mini_exiftool_num.changed_tags # ==> []
 mini_exiftool_num['Orientation'] # ==> 2
 mini_exiftool_num['ISO'] # ==> 200
Something went wrong with that request. Please try again.