使用 PHP 和 Javascript/Jquery 无法进行图像编辑

Image edit not working using PHP and Javascript/Jquery

图像编辑器无法使用更改图像大小、裁剪、旋转和调整图像接触的选项。 如何使用 javascript 或 jquery.

实现可自定义的图像编辑器选项

只需要这个未来,如裁剪、调整大小、使用撤消和重做选项进行调整。

<div>
  <img id="image" src="picture.jpg">
</div>

const image = document.getElementById('image');
const cropper = new Cropper(image, {
  aspectRatio: 16 / 9,
  crop(event) {
    console.log(event.detail.x);
    console.log(event.detail.y);
    console.log(event.detail.width);
    console.log(event.detail.height);
    console.log(event.detail.rotate);
    console.log(event.detail.scaleX);
    console.log(event.detail.scaleY);
  },
});

cropperjs可能会满足您的要求。