Does bug 891030 actually require you to read the orientation in terms of EXIF? I'd just say `metadata.rotation = (metadata.rotation + 90) % 360;` and we could have `jpeg_metadata_parser.js` have a function to convert from our internal orientation representation to EXIF.