i finished filters using camanjs, then i need to rotate this image, once rotated, the transformOrigin is (0, 0), i would like the transformOrigin to the center, also, the picture in the brower is not conpleted, how can i slove this problem?
<img src="./3-big.jpg" alt="" id='image' data-camanwidth="500" data-camanheight="500">
<script>
Caman("#image", function () {
var imgW = $('#image').width();
var imgH = $('#image').height();
this.rotate(45);
this.resize({ width: 400 * imgW / imgH, height: 400 });
this.render();
});
</script>
also, i have another question, if i want to scale this img, how can i do this?
Becase this is a img element transfer to a canvas element, how can i get the canvas element if i want to do something with canvas element?
Thanks for everyone who can help me!