Android 颤振:通过坐标从图像中提取矩形
我想从图像中提取一个矩形 rect由以下公式给出:Android 颤振:通过坐标从图像中提取矩形,android,flutter,kotlin,dart,Android,Flutter,Kotlin,Dart,我想从图像中提取一个矩形 rect由以下公式给出: final rect = Rect.fromLTRB(left, top, right, bottom); 我有Android背景,在Android中我做到了: private fun Rect.toBitmap(bitmap: Bitmap): Bitmap = Bitmap.createBitmap(bitmap, left, top, width(), height()) 我试用了这个图像库:但它不能正常工作 现在,有可能在飞镖/颤振
final rect = Rect.fromLTRB(left, top, right, bottom);
我有Android背景,在Android中我做到了:
private fun Rect.toBitmap(bitmap: Bitmap): Bitmap = Bitmap.createBitmap(bitmap, left, top, width(), height())
我试用了这个图像库:但它不能正常工作
现在,有可能在飞镖/颤振中实现同样的效果吗
亲切问候看看这个包裹: 它提供了一个cropImage功能,这可能是您正在寻找的
File crappedfile=await flatternativeimage.cropImage(File.path、originX、originY、width、height)代码>看看这个:太棒了!非常感谢你。您可以将此作为答案发布:)