Status Update
Comments
wu...@google.com <wu...@google.com>
ch...@google.com <ch...@google.com> #2
ma...@google.com <ma...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ch...@google.com <ch...@google.com> #4
Hi Max,
Please refer to the following javadoc description of
Camera devices may either encode this value into the JPEG EXIF header, or rotate the image data to match this orientation. When the image data is rotated, the thumbnail data will also be rotated.
Camera2 leaves the flexibility to the device. Most devices only apply the target orientation to the JPEG EXIF header. Some devices I know that directly rotate the image data are Nexus 5, Nokia 1 and Moto E5 Play.
sc...@google.com <sc...@google.com> #5
May I know what the benefits of pre-populate the info in MediaProvider are ?
Is it to speed up the time from photo taken to appearing in the photo browser ?
ma...@google.com <ma...@google.com> #6
Hi Scott. Yes, that's the main benefit.
sc...@google.com <sc...@google.com> #7
We are finalizing the API design and implementing it.
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit d06334462e1b0b027ecd289cbd53d807ff6fb73e
Author: Charcoal Chen <charcoalchen@google.com>
Date: Thu Jun 03 13:44:44 2021
Expose getResolutionInfo API to provide the resolution information for use cases
Relnote: "Exposed getResolutionInfo API to provide the resloution information for Preview, ImageCapture and ImageAnalysis."
Bug: 188600718
Test: ./gradlew camera:camera-core:build && ./gradlew camera:camera-core:connectedAndroidTest
Change-Id: I2b61350f38bafa40862c923077d9da2675f16905
M camera/camera-core/api/current.txt
M camera/camera-core/api/public_plus_experimental_current.txt
M camera/camera-core/api/restricted_current.txt
M camera/camera-core/src/androidTest/java/androidx/camera/core/ImageCaptureTest.java
M camera/camera-core/src/androidTest/java/androidx/camera/core/UseCaseTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageAnalysis.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/src/main/java/androidx/camera/core/Preview.java
A camera/camera-core/src/main/java/androidx/camera/core/ResolutionInfo.java
M camera/camera-core/src/main/java/androidx/camera/core/UseCase.java
ch...@google.com <ch...@google.com> #9
Hi Max,
A new getResolutionInfo API has been exposed from CameraX by aosp/1727613. You can use it to obtain the more precise resolution and crop rectangle information which should match the captured image dimensions after applying the rotation degrees. It means the following values will be the same:
- The resolution obtained from ResolutionInfo#getCropRect() after applying the value obtained from ResolutionInfo#getRotationDegrees().
- The saved image's dimensions after applying the Exif orientation value
On most devices, HAL doesn't directly rotate the image buffer to the target rotation orientation. But on few devices, the captured image might still have been rotated to the target rotation orientation by HAL. Therefore, in the case of your application, you might still need to double check the dimensions of the captured image and correct the database record.
ma...@google.com <ma...@google.com> #10
Thanks for adding the API so quickly, Charcoal!
Description
Add a new API to expose the resolution used by each use cases.
The API should return the actual resolution used in the use cases after bindToLifecycle is called.