Open luxiaowu opened 7 years ago
怎么让裁剪框不动,拖动图片(可放大缩小,最小不小过裁剪框) 我看croppie和cropper的API上都很清楚,区分裁剪框和容器
var vanilla = new Croppie(el, { viewport: { width: 300, height: 300 }, boundary: { width: 300, height: 300 }, showZoomer: false, // enableExif: true, enableOrientation: true }); vanilla.bind({ url: objectURL, orientation: 6 }); vanilla.result({ type: 'blob', size: { width: 300, height: 300 }, // format: 'jpeg', // quality: 0.8 }).then(function (blob) { // do something with cropped blob });
$(element).cropper({ // width: 300, // height: 300, viewMode: 3, dragMode: 'move', autoCropArea: 1, restore: false, guides: false, highlight: false, cropBoxMovable: false, cropBoxResizable: false, aspectRatio: 1, })
求使用 motion的ImageEditor的代码示例
motion
ImageEditor
实现固定大小的图片裁剪
怎么让裁剪框不动,拖动图片(可放大缩小,最小不小过裁剪框) 我看croppie和cropper的API上都很清楚,区分裁剪框和容器
croppie
cropper
求使用
motion
的ImageEditor
的代码示例