blob: e2b0d4cf46692b8089407302ba6bde4820e69e55 [file] [log] [blame]
<!DOCTYPE html>
<style>
div.container {
display: inline-block;
margin-right: 20px;
margin-bottom: 10px;
width: 100px;
vertical-align: top;
}
div.horizontal {
width: 102px;
height: 52px;
}
div.vertical {
width: 52px;
height: 102px;
}
iframe {
border: 1px solid black;
}
iframe.horizontal {
width: 100px;
height: 50px;
}
iframe.vertical {
width: 50px;
height: 100px;
}
</style>
<body>
<b>The images of the ImageDocuments should be rotated respecting their EXIF orientation.</b>
<br>
<br>
<div class="container">
<div class="horizontal">
<iframe class="horizontal" onload="onFrameLoad(this)" src="resources/exif-orientation-1-ul.jpg"></iframe>
</div>
<br>Normal
</div>
<div class="container">
<div class="horizontal">
<iframe class="horizontal" onload="onFrameLoad(this)" src="resources/exif-orientation-2-ur.jpg"></iframe>
</div>
<br>Flipped horizontally
</div>
<div class="container">
<div class="horizontal">
<iframe class="horizontal" onload="onFrameLoad(this)" src="resources/exif-orientation-3-lr.jpg"></iframe>
</div>
<br>Rotated 180&deg;
</div>
<div class="container">
<div class="horizontal">
<iframe class="horizontal" onload="onFrameLoad(this)" src="resources/exif-orientation-4-lol.jpg"></iframe>
</div>
<br>Flipped vertically
</div>
<br>
<div class="container">
<div class="vertical">
<iframe class="vertical" onload="onFrameLoad(this)" src="resources/exif-orientation-5-lu.jpg"></iframe>
</div>
<br>Rotated 90&deg; CCW and flipped vertically
</div>
<div class="container">
<div class="vertical">
<iframe class="vertical" onload="onFrameLoad(this)" src="resources/exif-orientation-6-ru.jpg"></iframe>
</div>
<br>Rotated 90&deg; CCW
</div>
<div class="container">
<div class="vertical">
<iframe class="vertical" onload="onFrameLoad(this)" src="resources/exif-orientation-7-rl.jpg"></iframe>
</div>
<br>Rotated 90&deg; CW and flipped vertically
</div>
<div class="container">
<div class="vertical">
<iframe class="vertical" onload="onFrameLoad(this)" src="resources/exif-orientation-8-llo.jpg"></iframe>
</div>
<br>Rotated 90&deg; CW
</div>
<br>
<div class="container">
<div class="horizontal">
<iframe class="horizontal" onload="onFrameLoad(this)" src="resources/exif-orientation-9-u.jpg"></iframe>
</div>
<br>Undefined (invalid value)
</div>
<script>
if (window.testRunner)
window.testRunner.waitUntilDone();
var iFrameLoadedCount = 0;
function onFrameLoad() {
if (++iFrameLoadedCount == 9) {
if (window.testRunner)
window.testRunner.notifyDone();
}
}
</script>
</body>