Test of EXIF Orientation Parameter in JPG/JPEG files
Synopsis:A test of EXIF orientation settings in JPG files by changing the orientation parameter only in the same file. Display of orientation is then dependent on the software and/or system used. Uploading to the outdoorking site removed the orientation effect of the EXIF orientation setting, rendering all images identical. Altering and resaving the files reset the orientation parameter to the default Top-Left (1) whilst maintaining the display orientation.

Systems used laptop w/ Win XPPro SP3, XNView 2.12 image viewer. Iphone 3G phone and Panasonic TZ-15 camera. Yes it's all prehistoric, but it works.

Procedure (Gist of it anyway, as it's getting late...early now!)
1) Photo with 'sidewards orientation' (EXIF Orientation "Right-top (6)" ) chosen to test viewing on PC through OS and software and for upload to OutDoorKing (ODK).
2) Photo with 'normal orientation' (EXIF Orientation "Top-left (1)" ) chosen to test altering the orientation parameter. parameter altered and saved using XNView. Images then viewed in O/S, XNView and uploaded to ODK.

Results (abridged, I wanna go to bed)
A) Test of 'sidewards oriented image'
  • Image taken with Iphone 3G, downloaded to PC.
  • Image orientation listed as right-top (6) so rotated 90 degrees anticlockwise
  • Image displays normally in XNView, i.e. as I expected (rotated 90 degrees clockwise from the camera's point-of-view)
  • Image displayed rotated 90 degrees anticlockwise in WinXP Explorer (i.e. as 'taken' from the camera's point-of-view)
  • Image uploaded to ODK using ODK's image upload window (under Firefox on WinXP PC). Image displayed (when clicked on) rotated 90 degrees anticlockwise (i.e. as 'taken' from the camera's point-of-view) before upload all finalised. Image upload then discontinued.


B) Test of 'normal oriented image' manipulation
  • Image taken with Panasonic DMC-TZ15, downloaded to PC.
  • Image orientation listed as top-left (1) so camera and human point-of-views align.
  • Image then copied another 7 times to renamed files (2-8)
  • Each renamed file has the orientation parameter adjusted corresponding to its number (2-8) and saved. Orientations are:

Orientation: Top-left (1)
Should appear normal

Orientation: Top-right (2)
Should appear mirrored horizontally

Orientation: Bottom-right (3)
Should appear rotated 180�

Orientation: Bottom-left (4)
Should appear mirrored vertically

Orientation: Left-top (5)
Should appear rotated 90� anti-clockwise then mirrored vertically

Orientation: Right-top (6)
Should appear rotated 90� clockwise

Orientation: Right-bottom (7)
Should appear rotated 90� clockwise then mirrored vertically

Orientation: Left-bottom (8)
Should appear rotated 90� anticlockwise listed as

  • Images displays as expected in XNView, i.e. rotated as listed above
  • Images displayed identically in original orientation for all orientations using WinXP explorer
  • Images begun to be uploaded to ODK using the ODK upload window, after three appear in identical original orientation upload is discontinued.


C) Test of JPG and PNG file saving
  • Resaving a file as a JPG in XNView resets the EXIF orientation parameter to "Top-left (1)" so preserving the current image display orientation.
  • JPGs often have a thumbnail attached to the file for quick icon display. the orientation of the thumbnail may not match the picture orientation especially if the EXIF orientation has been manually changed.
  • Saving a file as a PNG strips the EXIF information and therefore saves in the displayed orientation.


Conclusions
  • The camera and camera-phone used here (which use JPEG files) both save the orientation information of the photo in an EXIF- Orientation parameter in a JPEG file.
  • XNView is able to display the image in the correct EXIF orientation, this includes the thumbnail
  • Win XP through Explorer is not able to display the images in the correct orientation, this is likely a result of the old OS.
  • Upload to ODK through the standard file upload mechanism does not recognise the EXIF orientation information, as a result the orientation is stripped and incorrect unless it has been saved in the default "top-left (1)" orientation.
  • File upload was not completed once the files were viewed to save time, space and a mess on your screen!


If you've read this far, you should probably really find something else to do...like fix a mower! smile

Cheers,


Patrick