remvee / exifr

EXIF Reader
https://remvee.github.io/exifr/
MIT License
489 stars 66 forks source link

IPhone 3GS gets identified as TIFF #11

Closed corck closed 14 years ago

corck commented 14 years ago

Have following issue: reading in iphone 3gs photo like this path = "/spec/test_data/geotagged_pictures/iphone_geotagged_2.JPG" l = EXIFR::JPEG.new(path) the resulting object looks like this, having EXIFR:TIFF data.

<EXIFR::JPEG:0x7fc72961ee80 @exif=[{:shutter_speed_value=>Rational(12929, 1273), :white_balance=>0, :exposure_time=>Rational(1, 1141), :orientation=>#EXIFR::TIFF::Orientation:TopLeft(1), :metering_mode=>1, :pixel_x_dimension=>2048, :flash=>32, :x_resolution=>Rational(9, 8192), :gps_img_direction=>Rational(27545, 178), :host_computer=>"Mac OS X 10.6.3", :aperture_value=>Rational(4281, 1441), :f_number=>Rational(14, 5), :gps_latitude_ref=>"N", :y_resolution=>Rational(72, 1), :date_time_original=>Sun May 23 17:15:41 -0700 2010, :sharpness=>1, :pixel_y_dimension=>1536, :resolution_unit=>2, :gps_time_stamp=>[Rational(17, 1), Rational(15, 1), Rational(397, 10)], :exposure_program=>2, :ycb_cr_positioning=>1, :gps_latitude=>[Rational(49, 1), Rational(841, 100), Rational(0, 1)], :model=>"iPhone 3GS", :focal_length=>Rational(77, 20), :date_time_digitized=>Sun May 23 17:15:41 -0700 2010, :gps_longitude_ref=>"W", :make=>"Apple", :software=>"QuickTime 7.6.6", :iso_speed_ratings=>70, :gps_longitude=>[Rational(119, 1), Rational(1729, 50), Rational(0, 1)], :date_time=>Fri May 28 19:08:38 -0700 2010, :exposure_mode=>0, :sensing_method=>2, :color_space=>1, :gps_img_direction_ref=>"T"}, {:x_resolution=>Rational(9, 8192), :compression=>6, :resolution_unit=>2, :y_resolution=>Rational(72, 1), :ycb_cr_positioning=>1, :jpeg_interchange_format=>870, :jpeg_interchange_format_length=>3990}], @bits=8, @width=726, @comment="AppleMark\n", @height=968, @exif_data

remvee commented 14 years ago

That's because EXIF really is a TIFF snippet inside your JPEG.