I'm trying to crop an image using smartcrop.js whose original dimensions are 2042px by 1443px. The configuration below crops it to 23px by 17px. The image is loaded from an AWS Bucket.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/smartcrop/2.0.5/smartcrop.js">
</script>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function() {
const image = document.getElementsByTagName("img").item(0);
SmartCrop.crop(image, {
width: 1025,
height: 750,
minScale: 1.0
}).then(function(result) {
image.style.width = result.topCrop.width + "px";
image.style.height = result.topCrop.height + "px";
});
}, false);
</script>
What is the correct configuration?