robotmay / photographer-io

An open source photography community. No longer in production but still open source.
MIT License
664 stars 165 forks source link

No rotation from suggestions EXIF data. #138

Closed SoftlySplinter closed 11 years ago

SoftlySplinter commented 11 years ago

I've had a few photos that I've directly uploaded without modifying them that haven't rotated by 90 or 270 degrees.

Example: http://www.photographer.io/en/photographs/6169

Running exiftool (libimage-exiftool-perl) on it I do get:

Camera Orientation              : Rotate 270 CW

Full data:

ExifTool Version Number         : 8.60
<filesystem info snipped>
File Size                       : 5.2 MB
File Modification Date/Time     : 2013:08:03 12:19:32+01:00
File Permissions                : rwxr-xr-x
File Type                       : JPEG
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : Canon
Camera Model Name               : Canon EOS 550D
Orientation                     : Rotate 270 CW
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Modify Date                     : 2013:08:03 12:19:32
Artist                          : Alexander David Brown
Y Cb Cr Positioning             : Co-sited
Copyright                       : 
Exposure Time                   : 1/125
F Number                        : 5.6
Exposure Program                : Aperture-priority AE
ISO                             : 100
Exif Version                    : 0221
Date/Time Original              : 2013:08:03 12:19:32
Create Date                     : 2013:08:03 12:19:32
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/128
Aperture Value                  : 5.7
Flash                           : Off, Did not fire
Focal Length                    : 119.0 mm
Macro Mode                      : Normal
Self Timer                      : Off
Quality                         : Fine
Canon Flash Mode                : Off
Continuous Drive                : Continuous
Focus Mode                      : One-shot AF
Record Mode                     : JPEG
Canon Image Size                : Large
Easy Mode                       : Manual
Digital Zoom                    : None
Contrast                        : Normal
Saturation                      : Normal
Metering Mode                   : Evaluative
Focus Range                     : Not Known
Canon Exposure Mode             : Aperture-priority AE
Lens Type                       : Canon EF 80-200mm f/4.5-5.6 or Tamron Lens
Long Focal                      : 300 mm
Short Focal                     : 70 mm
Focal Units                     : 1/mm
Max Aperture                    : 4.2
Min Aperture                    : 33
Flash Activity                  : 0
Flash Bits                      : (none)
Zoom Source Width               : 0
Zoom Target Width               : 0
Manual Flash Output             : n/a
Color Tone                      : Normal
Auto ISO                        : 100
Base ISO                        : 100
Measured EV                     : 11.88
Target Aperture                 : 5.7
Target Exposure Time            : 1/128
Exposure Compensation           : 0
White Balance                   : Auto
Slow Shutter                    : None
Shot Number In Continuous Burst : 0
Optical Zoom Code               : n/a
Camera Temperature              : 31 C
Flash Guide Number              : 0
Flash Exposure Compensation     : 0
Auto Exposure Bracketing        : Off
AEB Bracket Value               : 0
Control Mode                    : Camera Local Control
Measured EV 2                   : 11.875
Bulb Duration                   : 0
Camera Type                     : EOS High-end
ND Filter                       : n/a
Canon Image Type                : Canon EOS 550D
Canon Firmware Version          : Firmware Version 1.0.8
Owner Name                      : Alexander Brown
<Serial Number Snipped after realising it was here>
Flash Metering Mode             : Off
Camera Orientation              : Rotate 270 CW
Focus Distance Upper            : 0 m
Focus Distance Lower            : 0 m
Firmware Version                : 1.0.8
File Index                      : 1851
Directory Index                 : 100
Contrast Standard               : 0
Sharpness Standard              : 3
Saturation Standard             : 0
Color Tone Standard             : 0
Contrast Portrait               : 0
Sharpness Portrait              : 2
Saturation Portrait             : 0
Color Tone Portrait             : 0
Contrast Landscape              : 0
Sharpness Landscape             : 4
Saturation Landscape            : 0
Color Tone Landscape            : 0
Contrast Neutral                : 0
Sharpness Neutral               : 0
Saturation Neutral              : 0
Color Tone Neutral              : 0
Contrast Faithful               : 0
Sharpness Faithful              : 0
Saturation Faithful             : 0
Color Tone Faithful             : 0
Contrast Monochrome             : 0
Sharpness Monochrome            : 3
Filter Effect Monochrome        : None
Toning Effect Monochrome        : None
Contrast User Def 1             : 0
Sharpness User Def 1            : 3
Saturation User Def 1           : 0
Color Tone User Def 1           : 0
Filter Effect User Def 1        : None
Toning Effect User Def 1        : None
Contrast User Def 2             : 0
Sharpness User Def 2            : 3
Saturation User Def 2           : 0
Color Tone User Def 2           : 0
Filter Effect User Def 2        : None
Toning Effect User Def 2        : None
Contrast User Def 3             : 0
Sharpness User Def 3            : 3
Saturation User Def 3           : 0
Color Tone User Def 3           : 0
Filter Effect User Def 3        : None
Toning Effect User Def 3        : None
User Def 1 Picture Style        : Standard
User Def 2 Picture Style        : Standard
User Def 3 Picture Style        : Standard
Canon Model ID                  : EOS Rebel T2i / 550D / Kiss X4
Thumbnail Image Valid Area      : 0 159 7 112
Serial Number Format            : Format 2
AF Area Mode                    : Multi-point AF or AI AF
Num AF Points                   : 9
Valid AF Points                 : 9
Canon Image Width               : 5184
Canon Image Height              : 3456
AF Image Width                  : 5184
AF Image Height                 : 3456
AF Area Widths                  : 129 129 129 181 222 181 129 129 129
AF Area Heights                 : 172 172 172 117 221 117 172 172 172
AF Area X Positions             : -1363 -819 -819 0 0 0 819 819 1363
AF Area Y Positions             : 0 387 -387 729 0 -729 387 -387 0
AF Points In Focus              : 4,8
AF Points Selected              : 0,1,2,3,4,5,6,7,8
Original Decision Data Offset   : 0
Bracket Mode                    : Off
Bracket Value                   : 0
Bracket Shot Number             : 0
Raw Jpg Size                    : Large
Long Exposure Noise Reduction 2 : Off
WB Bracket Mode                 : Off
WB Bracket Value AB             : 0
WB Bracket Value GM             : 0
Live View Shooting              : Off
Flash Exposure Lock             : Off
Lens Model                      : 70-300mm
Internal Serial Number          : VA0722137
Dust Removal Data               : (Binary data 1024 bytes, use -b option to extract)
Crop Left Margin                : 0
Crop Right Margin               : 0
Crop Top Margin                 : 0
Crop Bottom Margin              : 0
Exposure Level Increments       : 1/3 Stop
ISO Expansion                   : Off
Flash Sync Speed Av             : Auto
Long Exposure Noise Reduction   : Off
High ISO Noise Reduction        : Standard
Highlight Tone Priority         : Disable
AF Assist Beam                  : Emits
Mirror Lockup                   : Disable
Shutter-AE Lock                 : AF/AE lock
Set Button When Shooting        : Normal (disabled)
LCD Display At Power On         : Display
Add Original Decision Data      : Off
Tone Curve                      : Standard
Sharpness                       : 3
Sharpness Frequency             : n/a
Sensor Red Level                : 0
Sensor Blue Level               : 0
White Balance Red               : 0
White Balance Blue              : 0
Color Temperature               : 5200
Picture Style                   : Standard
Digital Gain                    : 0
WB Shift AB                     : 0
WB Shift GM                     : 0
Measured RGGB                   : 529 1024 1024 546
VRD Offset                      : 0
Sensor Width                    : 5344
Sensor Height                   : 3516
Sensor Left Border              : 152
Sensor Top Border               : 56
Sensor Right Border             : 5335
Sensor Bottom Border            : 3511
Black Mask Left Border          : 0
Black Mask Top Border           : 0
Black Mask Right Border         : 0
Black Mask Bottom Border        : 0
Color Data Version              : 7 (500D/550D/7D/1DmkIV)
WB RGGB Levels As Shot          : 2222 1024 1024 1705
Color Temp As Shot              : 4720
WB RGGB Levels Auto             : 2222 1024 1024 1705
Color Temp Auto                 : 4720
WB RGGB Levels Measured         : 2030 1024 1023 1940
Color Temp Measured             : 4080
WB RGGB Levels Daylight         : 2289 1024 1024 1553
Color Temp Daylight             : 5200
WB RGGB Levels Shade            : 2655 1024 1024 1319
Color Temp Shade                : 7000
WB RGGB Levels Cloudy           : 2473 1024 1024 1429
Color Temp Cloudy               : 6000
WB RGGB Levels Tungsten         : 1623 1024 1024 2362
Color Temp Tungsten             : 3200
WB RGGB Levels Fluorescent      : 2020 1024 1024 2222
Color Temp Fluorescent          : 3763
WB RGGB Levels Kelvin           : 2289 1024 1024 1553
Color Temp Kelvin               : 5212
WB RGGB Levels Flash            : 2545 1024 1024 1417
Color Temp Flash                : 6218
Raw Measured RGGB               : 219208 437514 438399 234172
Custom Picture Style File Name  : 
Peripheral Lighting             : Off
Peripheral Lighting Value       : 24
Original Image Width            : 5184
Original Image Height           : 3456
Peripheral Lighting Setting     : Off
Auto Lighting Optimizer         : Standard
User Comment                    : 
Sub Sec Time                    : 88
Sub Sec Time Original           : 88
Sub Sec Time Digitized          : 88
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 5184
Exif Image Height               : 3456
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Focal Plane X Resolution        : 5728.176796
Focal Plane Y Resolution        : 5808.403361
Focal Plane Resolution Unit     : inches
Custom Rendered                 : Normal
Exposure Mode                   : Auto
Scene Capture Type              : Standard
Compression                     : JPEG (old-style)
Thumbnail Offset                : 8748
Thumbnail Length                : 14103
Image Width                     : 5184
Image Height                    : 3456
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Aperture                        : 5.6
Drive Mode                      : Continuous Shooting
File Number                     : 100-1851
Image Size                      : 5184x3456
Lens                            : 70.0 - 300.0 mm
Lens ID                         : Tamron AF 70-300mm f/4.5-5.6 Di LD 1:2 Macro Zoom
Scale Factor To 35 mm Equivalent: 1.6
Shooting Mode                   : Aperture-priority AE
Shutter Speed                   : 1/125
Create Date                     : 2013:08:03 12:19:32.88
Date/Time Original              : 2013:08:03 12:19:32.88
Modify Date                     : 2013:08:03 12:19:32.88
Thumbnail Image                 : (Binary data 14103 bytes, use -b option to extract)
WB RGGB Levels                  : 2222 1024 1024 1705
Blue Balance                    : 1.665039
Circle Of Confusion             : 0.019 mm
Field Of View                   : 11.0 deg
Focal Length                    : 119.0 mm (35 mm equivalent: 187.2 mm)
Hyperfocal Distance             : 132.37 m
Lens                            : 70.0 - 300.0 mm (35 mm equivalent: 110.1 - 471.8 mm)
Light Value                     : 11.9
Red Balance                     : 2.169922
robotmay commented 11 years ago

This has been on my to-do list for ages but I hadn't gotten around to it! I'm hoping to get it added in within the next week. Make sure to bug me if I don't update this with a fix soon :)

robotmay commented 11 years ago

First step towards support for auto-rotation is in. The metadata extractor will now actually retrieve that value; it just needs to be parsed correctly now, which I'll be working on tomorrow :)

robotmay commented 11 years ago

This is finally fixed and working!