HarvestProfit / react-native-rectangle-scanner

React Native Document/Rectangle Scanner
MIT License
199 stars 62 forks source link

Inconsistent Aspect Ratio #79

Closed ssudekum closed 3 years ago

ssudekum commented 3 years ago

I have been integrating this library with a cropping tool, and I noticed that the resulting photo from the scanner is sometimes not the same dimensions as the image displayed in the camera preview.

I am feeding the detectedRectangle to the cropper from my scanner component, and the inconsistency is definitely having an impact on my ability accurately translate that rectangle from one view to the other. Attached are some examples of my emulated Pixel 4 (working) and my real Galaxy S10 (not working).

You'll notice that the much more of the cord attached to my computer is visible in the resulting photo from the S10.

(Galaxy S10) Screenshot_20201211-155042_factoring Screenshot_20201211-155049_factoring

Pixel 4 Screenshot_1607723685 Screenshot_1607723690