Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android : Camera preview distortion / wrong aspect ration with screenOrientation="portrait" in manifest
Qt 6.11 is out! See what's new in the release blog

Android : Camera preview distortion / wrong aspect ration with screenOrientation="portrait" in manifest

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 473 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    m2dtkast
    wrote on last edited by m2dtkast
    #1

    I am currently experiencing a weird problem.
    The app I am working on (targeting android mobile), is supposed to be portrait only.
    So, I force the screenOrientation="portrait" in the manifest.
    The app also relies on the qml Camera.

    The viewfinder is configured with autorotate on.
    But the viewfinder is posing a weird problem; in that on the android devices I have been testing with,
    the preview's picture aspect ratio is reversed to what it actually should be : meaning, the preview appears wide/landscape in portrait, if I rotate the phone to landscape - the screen does not change due to the manifest setting- it appeares narrow/portrait in landscape. I tried the same with the qmlvideo example (setting the manifest) and I am unable to reproduce this exact behaviour.

    If in my app i revert the manifest to "undefined" (default), the issue goes away and the video in the preview has the correct aspect ratio, no matter the orientation (but of course the screen rotates, which is not desired).

    How would I be able to reproduce this wrong aspect ratio in the qmlvideo?
    I tried changing resolution of the camera, but that doesn't affect the viewfinder (which is always something in 1920x1440 apparently).

    I don't think this is a camera misconfiguration; as the same behaviour applies in the app even with a non-customized camera, i.e.

    Camera {
    id:camera
    }

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved