image-orientation-from-image-dynamic1.html (2126B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Images Module Level 3: change from image-orientation: none to from-image</title> 6 <link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org"> 7 <link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-image-orientation"> 8 <link rel="match" href="reference/image-orientation-from-image-ref.html"> 9 <meta name="fuzzy" content="maxDifference=0-100; totalPixels=0-236"> 10 <style> 11 body { 12 overflow: hidden; 13 } 14 img { 15 image-orientation: none; 16 } 17 div { 18 display: inline-block; 19 width: 100px; 20 vertical-align: top; 21 } 22 </style> 23 <script> 24 function runTest() { 25 for (var i = 1; i <= 9; i++) { 26 document.getElementById("img" + i).style.imageOrientation = "from-image"; 27 } 28 } 29 </script> 30 </head> 31 <body onload="runTest()"> 32 <p>The images should rotate respecting their EXIF orientation because 33 image-orientation: from-image is specified.</p> 34 <div> 35 <img id="img1" src="support/exif-orientation-1-ul.jpg"/> 36 <br>Normal 37 </div> 38 <div> 39 <img id="img2" src="support/exif-orientation-2-ur.jpg"/> 40 <br>Flipped horizontally 41 </div> 42 <div> 43 <img id="img3" src="support/exif-orientation-3-lr.jpg"/> 44 <br>Rotated 180° 45 </div> 46 <div> 47 <img id="img4" src="support/exif-orientation-4-lol.jpg"/> 48 <br>Flipped vertically 49 </div> 50 <div> 51 <img id="img5" src="support/exif-orientation-5-lu.jpg"/> 52 <br>Rotated 90° CCW and flipped vertically 53 </div> 54 <div> 55 <img id="img6" src="support/exif-orientation-6-ru.jpg"/> 56 <br>Rotated 90° CW 57 </div> 58 <div> 59 <img id="img7" src="support/exif-orientation-7-rl.jpg"/> 60 <br>Rotated 90° CW and flipped vertically 61 </div> 62 <div> 63 <img id="img8" src="support/exif-orientation-8-llo.jpg"/> 64 <br>Rotated 90° CCW 65 </div> 66 <div> 67 <img id="img9" src="support/exif-orientation-9-u.jpg"/> 68 <br>Undefined (invalid value) 69 </div> 70 </body> 71 </html>