2

I want to get a full-bleed and no-stretched preview with the CWAC library.

I have tested the demo app from the git repository on a Nexus 7 (2013) with Android 4.4.4, and the preview is stretched.I did not succeed to configure the SimpleCameraHost to fix this.

Is threre a way to get a fullscreen preview without stretching, and therefore put a part of the preview outside the screen?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Matthias
  • 21
  • 2
  • Full-bleed preview is enabled by default. – CommonsWare Jul 21 '14 at 16:40
  • Yes, but when the aspect ratio of the preview is different from that of the CameraView, the preview is stretched to fit to the view. Is it the intented behaviour? Can we change the size of the CameraView to avoid to stretch the preview? – Matthias Jul 21 '14 at 17:49
  • "the preview is stretched to fit to the view" -- not that I am aware of. Full-bleed preview is enabled by default, which means the view extends beyond the boundaries of its container if the preview aspect ratio does not match the view's aspect ratio. If you are convinced that is not what you are seeing, file an issue on the issue tracker, and I'll investigate it in a few weeks when I can devote some time to the library. – CommonsWare Jul 21 '14 at 21:28
  • 1
    Thank you, I have opened an issue https://github.com/commonsguy/cwac-camera/issues/190 – Matthias Jul 21 '14 at 22:37
  • `getPreviewSize()` must return a `Size` with same ratio to one of the supported preview size by the camera. – John Pang Nov 23 '14 at 00:52

0 Answers0