Status Update
Comments
an...@google.com <an...@google.com>
th...@gmail.com <th...@gmail.com> #2
Any update here?
an...@google.com <an...@google.com> #3
Thanks for filing the issue.
Could you help to provide the supported output sizes of JPEG format on the Huawei Mate 20 Lite device?
The info can be obtained by StreamConfigurationMap#getOutputSizes in CameraCharacteristics.
th...@gmail.com <th...@gmail.com> #4
Hello,
Thank you for response.
It took me a bit to find user with this device, but here are output sizes for SNE-LX1 (Huawei Mate 20 Lite):
[5120x3840, 5120x2880, 5120x2448, 3840x3840, 3264x2448, 3264x1840, 2560x1920, 2560x1440, 1920x1080, 1600x1200, 1920x920, 1280x720, 640x480, 320x240]
th...@gmail.com <th...@gmail.com> #5
I experienced this issue while requesting photos with resolution 3000x4000 (portrait) and 1200x1600 (portrait) and I also tried to upgrade library to 1.0.0-beta07.
an...@google.com <an...@google.com>
an...@google.com <an...@google.com> #6
I find the device Huawei Mate 20 which can reproduce this issue.
There is an issue in ViewPort API, it will crop the wrong aspect ratio if the rotation of JPEG is not 90 degrees, like the JPEG which is captured on the Huawei devices.
To make sure the issue is same with yours, did you use the API setViewPort(ViewPort) of UseCaseGroup and bind the UseCaseGroup to Lifecycle?
If yes, I think the fix should be available in the next release.
The ViewPort is a feature which can achieve WYSIWYG.
If you want to workaround this bug now, maybe you can try not to call setViewPort(ViewPort).
th...@gmail.com <th...@gmail.com> #7
Hmm I would say that my configuration looks almost the same like in the base repo from camera samples (
To clarify, I only use method with ViewPort set to null:
val camera = cameraProvider.bindToLifecycle(lifecycleOwner, selector, preview, imageCapture)
Should I try to play with ViewPort feature?
an...@google.com <an...@google.com> #8
Sorry for taking your time, could you provider more information of this issue.
Could this issue be reproduced with cameraXBasic app which is modified to setTargetResolution(Size(1200, 1600)) rather than setAspectRatio()?
Which devices you can also reproduce this issue except Huawei Mate 20 Lite?
Because I don't have Huawei Mate 20 Lite currently. I have tried some Huawei phones, but all of these devices can't reproduce the issue with cameraXBasic modified to setTargetResolution(Size(1200, 1600)).
What is the observed image result of this issue? Could you provide what is the captured image resolution?
Description
CAMERAX VERSION: 1.0.0-beta06
DEVICE NAME: Huawei Mate 20 Lite
DESCRIPTION:
Let's say we want to capture only portrait (not landscape) photos with the target resolution of 1200x1600 pixels.
According to the documentation of setTargetResolution method in ImageCapture.Builder:
we should build ImageCapture use case like that:
Let's assume we have always our phone in a portrait natural orientation.
Everything works fine excepts on some Huawei phones (e.g. Huawei Mate 20 Lite) the image is cropped as we would inverse the size dimensions (i.e. Size(1600,1200)).
Is there any "safe" workaround that we could use to solve this issue? I would not prefer to blacklist the Huawei devices like a Signal does .