Crop support?
mkummer225 opened this issue · comments
I need to crop and resize NV12 / NV21 images – I'm able to use .scale currently but was wondering if there was a .crop or .copyTo or something that would allow cropping?
Currently, it is not possible to do cropping.
I am very busy and cannot add the feature.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
This would be quite useful feature in Android. As far as I know, at the moment, there are no tools to crop, rotate yuv420p or NV21 in Android. I think these features could be used for Google MLKit, when processing camera images, e.g. barcode scanner. Right now you basically pass whole ImageProxy to the barcode scanner, and it looks for barcodes everywhere on the image which can be very slow, especially when preview resolution is higher. Meanwhile, if you could crop specific region where to look for the barcodes, that would be much faster.
Hey! Has anyone managed to bridge the libyuv's C crop feature to Android yet?
I could try to create a PR here
@mkummer225 @Luke265 @mrousavy
v0.31.0 with crop support has been released.
By storing range in buffer#cropRect, it is enabled.
convertTo method is supported. asBitmap is not yet supported.