Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | <!DOCTYPE> |
michael@0 | 2 | <head> |
michael@0 | 3 | <style> |
michael@0 | 4 | body { |
michael@0 | 5 | border: 0px; |
michael@0 | 6 | margin: 0px; |
michael@0 | 7 | padding: 0px; |
michael@0 | 8 | } |
michael@0 | 9 | img { |
michael@0 | 10 | border: 50px solid black; |
michael@0 | 11 | margin: 50px; |
michael@0 | 12 | padding: 50px; |
michael@0 | 13 | } |
michael@0 | 14 | </style> |
michael@0 | 15 | </head> |
michael@0 | 16 | <body> |
michael@0 | 17 | <!-- This is deliberately an image with a non-neutral inherent orientation to |
michael@0 | 18 | ensure that the inherent orientation is irrelevant. --> |
michael@0 | 19 | <img src="image-exif-90-deg-flip.jpg"> |
michael@0 | 20 | |
michael@0 | 21 | <script> |
michael@0 | 22 | var orientation = location.search.substring(1).split("&"); |
michael@0 | 23 | var angle = orientation[0]; |
michael@0 | 24 | var flip = orientation[1] == "flip" ? true : false; |
michael@0 | 25 | |
michael@0 | 26 | // Construct a style. |
michael@0 | 27 | var style = "img { image-orientation: " |
michael@0 | 28 | + angle + "deg" |
michael@0 | 29 | + (flip ? " flip" : "") |
michael@0 | 30 | + "; }\n"; |
michael@0 | 31 | |
michael@0 | 32 | // Apply the style to the document. |
michael@0 | 33 | var sheet = document.createElement('style'); |
michael@0 | 34 | sheet.innerHTML = style; |
michael@0 | 35 | document.body.appendChild(sheet); |
michael@0 | 36 | </script> |
michael@0 | 37 | </body> |