Taking picture without cropping output takes ~0.5 - 0.8 seconds. When set crop output to true it takes ~3 seconds. Is there any way to make it faster?
It's not only slow, it's also prone to out of memory errors #91 . We take the JPEG, decompress to Bitmap in full resolution, crop the Bitmap, compress again to JPEG. This is a relic from CameraKit and it sucks.
To make it faster in your app you can simply not use it. Use wrap_content for width and height so there is nothing to be cropped.
To make it faster in the library we need to use the NDK and do the cropping in native code. There are native libraries (example) that can crop a JPEG file without even decompressing, no middle steps. That would be super fast and no OOM at all.
If some of you wants to inject the NDK in CameraView, that's very welcome!
This looks easy:
In this case we don't need the NDK at runtime (just for building the .so?) and we get bindings already?
I don't think that this is very important and necessary. the reasons are following:
I also don't think this is very important, at least it's not coming soon... let's close for now.