<!doctype html> | |
<html> | |
<body style='margin:0px; display: flex;'> | |
<img id='sizer'/> | |
<script> | |
// The desired size should be specified in the url in the search portion | |
// like this ?widthDimension:heightDimension. | |
var parsedParameters = window.location.search.substring(1).split(':'); | |
// Set the sizes. | |
var elementToSize = document.getElementById('sizer'); | |
elementToSize.style.width = parsedParameters[0]; | |
elementToSize.style.height = parsedParameters[1]; | |
</script> | |
</body> | |
</html> |