Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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…
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
COPYING
Changelog
README
Rakefile
mini_exiftool.spec

README

= MiniExiftool

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

== Requirements

An installation of the Exiftool command-line application.
Instructions for installation you can find under
http://www.sno.phy.queensu.ca/~phil/exiftool/install.html .

== 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'].class # ==> Time
 
 mini_exiftool.orientation # ==> 'Horizontal (normal)'
 mini_exiftool.iso # ==> 400
 mini_exiftool.datetimeoriginal.class # ==> Time
 mini_exiftool.date_time_original.class # ==> Time
 
 # 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.