Plugin details

This comes from one project that required reading exif tags for image rotation

Exif Fu assumes you're using attachment_fu as your file handler (thus exif_fu), although it is easy enough to hack the library to use any other file library.

Websitehttp://rubyforge.org/projects/exiffu/ Repositoryhttp://exiffu.rubyforge.org/svn/ Author Matthew Vincent LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://exiffu.rubyforge.org/svn/

Example
======

All you need to do is add exif_fu to your model and you're ready to go. Here is one example:

class Photo < ActiveRecord::Base
  
  exif_fu
  
  has_attachment :content_type => :image,
                 :storage => :file_system,
                 :processor => :mini_magick,
                 :size => 500..5.megabytes,
                 :path_prefix => "public/#{table_name}",
                 :thumbnails => {:medium => '600x600>', :thumb => '100x100>' }

  validates_as_attachment
  
end



Usage
=====

Once you've setup your model, all you have to do is call some of the methods on the model, some examples:

photo.iso


would reutrn "800"

photo.shot_by


would reutrn "Matthew Vincent"

photo.aperture


would reutrn 4.0

photo.exif_tag("MyCustomExifTag")


would reutrn "You got your tag"

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: Guest, 4 months ago