Closed zzz08900 closed 1 week ago
I just opened a PR for approach 2. Be sure to test it and proof read it, like really carefully, before merging.
https://github.com/gev2002/react-native-vision-camera-barcodes-scanner/pull/5
I agree with approach #2. I am trying to draw a rectangle on a QR code and it works fine on iOS but on Android the coordinates are always rotated. It would be good to return coodinates that are true to the frame's orientation
Hi, this will be fixed soon in the new release.
In mid June RNVC released initial support for orientation and the most recent release 4.5.0 had most of its orientation bugs iron out.
One major change (though @mrousavy does not consider it breaking) is RNVC no longer rotates (pixel displacing) the
CMSampleBuffer
on iOS and instead we need to handle orientation related stuff usingFrame.orientation
Things all look great at first glance but after some real testing, I believe I had found a (long-existing) bug of MLKit barcode scanner on iOS: When generating
VisionImage
fromCMSampleBuffer
orientation specified inVisionImage.orientation
is completely ignored and if theCMSampleBuffer
is rotated then so will the detection results.Considering the fact that Google does not really care about MLKit on iOS, I figure we need to come up with a solution on our own.
I'm proposing
twothree possible approaches:Frame.orientation
, before sending them back to JS side. Could look pretty ugly.What do you guys think?