yushulx / android-camera-preview

MIT License
19 stars 15 forks source link

Preview is streched #1

Closed efinder2 closed 4 years ago

efinder2 commented 4 years ago

I've installed the app on multiple Samsung devices(SM-T395, SM-T585...). On all of them the camera preview is streched. How to calculate the preview correct or is this a device specific Problem? On emulators all seems fine.

yushulx commented 4 years ago

@efinder2 Maybe it's Samsung's issue. The Camera2 API can not support all devices well. I used an AutoFitTextureView class https://github.com/yushulx/android-camera-preview/blob/master/camera2/app/src/main/java/com/dynamsoft/camera2/AutoFitTextureView.java to fix the preview issue that appeared on my device. You can try to replace the class with the default TextureView.

efinder2 commented 4 years ago

Also with the default texture view I had similar problems. The preview image is always too wide for the preview

yushulx commented 4 years ago

@efinder2 try to post the issue to StackOverflow or Samsung's dev forum.

efinder2 commented 4 years ago

I've moved back to the original Camera2BasicJava example. With this code i get black stripes. So I posted it on StackOverflow: https://stackoverflow.com/questions/59262779/how-to-show-a-camera-preview-with-the-new-android-hardware-camera2-api