Open tarasovladislav opened 2 weeks ago
You can calculate the percentage based on the desired region and frame's size. I don't think it is really needed to support pixel as well.
As for the rotation prop, I don't know what it is used for.
@xulihang Hi, thanks for your answer, alright with px.
But regarding rotation: https://github.com/mrousavy/vision-camera-resize-plugin/issues/43#issuecomment-1981324379
device.sensorOrientation - but this is not guaranteed to be correct by Android. Some vendors choose to not implement it properly, specifically on Samsungs it's 180 deg rotated.
CameraX has workarounds for all such quirks, in VisionCamera V4 that should be fixed.
So I just copied your sample and on my samsung images are rotated 180 so instead of cropping from top, it crops from bottom.
Okay. The plugin automatically rotates the frames so that it matches the preview. But it seems that Samsung phones not work in the same way.
I will add a rotation option but you have to enable it based on difference devices
I added a method to rotate an image in v1.1.0.
Hi, would be nice if its possible to set height and width in pixels, not %.
Also, is it possible to add rotation prop before frame is cropped?