I am using Rails paperclip for displaying the images in my page. I want to know how to retrieve EXIF information of an image(like dimensions, camera model,height,width., etc).Can any one help me out???
Thanks!!!
Using Windows, you can see whether a photo has Exif data attached to it by right-clicking on the file, selecting Properties, and checking under the Details tab. You can also use this menu to remove most Exif data, including location information, by clicking Remove Properties and Personal Information.
If you're using a Windows PC, right click the file and select 'Properties'. This will then display some of the EXIF data. If you're using a Mac, then right click and select 'Get Info'. These options won't show you all of the EXIF data though, but it'll show you the key bits such as settings used.
Details. Retrieve Exif Data from image binary data. This extension can be used in page or logic actions, to retrieve stored Exif data from an image. The image binary can be presented as a parameter to one of the functions in the XIF.
Did you give exifr gem a try? From the documentation
EXIFR::JPEG.new('IMG_6841.JPG').width # => 2272 EXIFR::JPEG.new('IMG_6841.JPG').height # => 1704 EXIFR::JPEG.new('IMG_6841.JPG').exif? # => true EXIFR::JPEG.new('IMG_6841.JPG').model # => "Canon PowerShot G3" EXIFR::JPEG.new('IMG_6841.JPG').date_time # => Fri Feb 09 16:48:54 +0100 2007 EXIFR::JPEG.new('IMG_6841.JPG').exposure_time.to_s # => "1/15" EXIFR::JPEG.new('IMG_6841.JPG').f_number.to_f # => 2.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With