Skip to content

Instantly share code, notes, and snippets.

@vestel
Created March 2, 2010 09:24
Show Gist options
  • Save vestel/319378 to your computer and use it in GitHub Desktop.
Save vestel/319378 to your computer and use it in GitHub Desktop.
# This is special script to detect jpg files' exif content. Usage 'script.rb filename.jpg'
require 'rubygems'
require 'exifr'
image_file = ARGV.first
exif_info = nil
exif_info = EXIFR::JPEG.new(image_file)
if exif_info.exif? then
exif_info.exif.to_hash.each_pair do |key, value|
puts "#{key.to_s.rjust(30)} : #{value}"
end
else
puts "No EXIF"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment