andreluisjunqueira / react-native-document-scanner-android

Document scanner android, feature live detection, auto-capture, perspective correction :vibration_mode: :camera: -- :trophy:
MIT License
83 stars 32 forks source link

Aspect ratio #34

Open ELPepe87 opened 5 years ago

ELPepe87 commented 5 years ago

Would be nice to have a prop where you could set an aspect ratio for the camera preview. getMaxPreviewResolution function (OpenNoteCameraView.java) as for now returns the supported resolution with maximum width and for example on my device that means resolving to a resolution of 2560x800. That's pretty awkward to work with. :) Resulting aspect ratio is then used for finding the corresponding image size and that's also problematic in this case. Seems to work decently when modified to get max preview resolution by width * height.