Preview is stretched in width
See original GitHub issueWhile the captured image shows the correct aspect ratio, the preview is obviously stretched in width. I’ve tried to set different aspect ratios, e.g. 1/1
or viewFinderWidth/viewFinderHeight
to the preview config, as well as transforming the scale of the viewFinder by
matrix.setScale(outputTextureWidth/viewFinderWidth, outputTextureHeight/viewFinderHeight); viewFinder.setTransform(matrix);
but none of this could resolve the issue.
(Capture config was setup with the same values as the preview config, i.e. targetAspectRatio and targetResolution)
Phone: Huawei P9 lite Android: 7.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Android Camera Preview Stretched - Stack Overflow
What needs to be done is to set camera preview layout width and height to match the chosen camera size ratio, so the...
Read more >Android Camera Preview Stretch Issue | by Vikram Kodag
The root of all issues is the height-width ratio to display the camera preview. Download the Full source code. Happy coding….!! Android.
Read more >Android Camera Preview Stretch Issue - MindBowser
The most important bug in the Camera Preview Stretch Issue is the ratio given to display a camera preview. So if the preview...
Read more >Camera - SurfaceView displays stretched preview
CameraSource and it has a method setRequestedPreviewSize(width, ... My problem is that on different devices the preview is stretched.
Read more >Email Banner Preview Image stretched - Marketing Nation
At a very quick glance, you've probably got contention between the height and width HTML attributes, and the width=100% in the style. Some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There we go: https://issuetracker.google.com/issues/138814839
It does not work for me