Flutter 如何在原始图像中获取裁剪图像的坐标
在颤振插件图像裁剪器中是否有方法获得原始图像中裁剪图像的坐标? 目前只返回croppedFile作为文件,是否也可以获取坐标信息Flutter 如何在原始图像中获取裁剪图像的坐标,flutter,Flutter,在颤振插件图像裁剪器中是否有方法获得原始图像中裁剪图像的坐标? 目前只返回croppedFile作为文件,是否也可以获取坐标信息 File croppedFile = await ImageCropper.cropImage( sourcePath: _image.path, androidUiSettings: AndroidUiSettings( toolbarTitle: 'Cropp
File croppedFile = await ImageCropper.cropImage(
sourcePath: _image.path,
androidUiSettings: AndroidUiSettings(
toolbarTitle: 'Cropper',
toolbarColor: Colors.blue,
toolbarWidgetColor: Colors.white,
initAspectRatio: CropAspectRatioPreset.original,
lockAspectRatio: false,
hideBottomControls: true),
iosUiSettings: IOSUiSettings(
minimumAspectRatio: 1.0,
));
这样写将打印裁剪文件的坐标
File croppedFile = await ImageCropper.cropImage(
sourcePath: imageFile,
aspectRatioPresets: [
CropAspectRatioPreset.square,
CropAspectRatioPreset.ratio3x2,
CropAspectRatioPreset.original,
CropAspectRatioPreset.ratio4x3,
CropAspectRatioPreset.ratio16x9
],
androidUiSettings: AndroidUiSettings(
toolbarTitle: 'Cropper',
toolbarColor: Colors.deepOrange,
toolbarWidgetColor: Colors.white,
initAspectRatio: CropAspectRatioPreset.original,
lockAspectRatio: false,
),
iosUiSettings: IOSUiSettings(
minimumAspectRatio: 1.0,
));
setState(() {
userSelectedImage = croppedFile;
print("croppedFile ${croppedFile}");
});
这仅打印文件位置,而不打印原始图片的坐标