Fixed
Status Update
Comments
er...@google.com <er...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
g....@gmail.com <g....@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
er...@google.com <er...@google.com> #4
Thanks for the samples, we'll take a look
er...@google.com <er...@google.com>
er...@google.com <er...@google.com> #5
Hi there,
Just an update as I wanted to find out if Huawei had different compression quality - it looks like it does - of the handful of devices their jpg size from the camera is relatively higher than the comparable Pixel or other devices.
I do understand that this is a feature request for specifying the compression quality so I've cc'd our Product Manager for consideration for future work. We'll take a look and update as we plan and execute. Thanks
Just an update as I wanted to find out if Huawei had different compression quality - it looks like it does - of the handful of devices their jpg size from the camera is relatively higher than the comparable Pixel or other devices.
I do understand that this is a feature request for specifying the compression quality so I've cc'd our Product Manager for consideration for future work. We'll take a look and update as we plan and execute. Thanks
mi...@gmail.com <mi...@gmail.com> #6
Is there any view into the roadmap regarding specifying the compression quality? We are looking to switch to camerax, but the larger (file size) photos currently would have a noticeable impact on the user experience.
wu...@google.com <wu...@google.com>
sc...@google.com <sc...@google.com> #9
Though currently apps cannot set the jpeg quality, ImageCapture CAPTURE_MODE_MINIMIZE_LATENCY mode will set the jpeg quality to 95 and CAPTURE_MODE_MAXIMIZE_QUALITY will set it to 100.
In our experiments, it does make a lot of differences in file size. We will continue to explore the possibility of adding new API to configure jpeg quality.
In our experiments, it does make a lot of differences in file size. We will continue to explore the possibility of adding new API to configure jpeg quality.
sc...@google.com <sc...@google.com>
ch...@google.com <ch...@google.com>
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit 4d5782ce903c98f3236ae1171effc34f506b5f17
Author: Charcoal Chen <charcoalchen@google.com>
Date: Wed Aug 25 14:54:24 2021
Compress the output image with the specified JPEG quality level for capture modes when cropping is needed
Relnote: "When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is CAPTURE_MODE_MINIMIZE_LATENCY, the JPEG compression quality will be 95. If the capture mode is CAPTURE_MODE_MAXIMIZE_QUALITY, the JPEG compression quality will be 100."
Bug: 142856426
Test: ./gradlew camera:camera-core:build && ./gradlew camera:camera-core:connectedAndroidTest
Change-Id: Ieb37cfede4173d165bd481b86a04545887b0d487
M camera/camera-core/src/androidTest/java/androidx/camera/core/ImageSaverTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageSaver.java
M camera/camera-core/src/main/java/androidx/camera/core/internal/utils/ImageUtil.java
M camera/camera-core/src/test/java/androidx/camera/core/internal/utils/ImageUtilTest.java
https://android-review.googlesource.com/1810058
Branch: androidx-main
commit 4d5782ce903c98f3236ae1171effc34f506b5f17
Author: Charcoal Chen <charcoalchen@google.com>
Date: Wed Aug 25 14:54:24 2021
Compress the output image with the specified JPEG quality level for capture modes when cropping is needed
Relnote: "When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is CAPTURE_MODE_MINIMIZE_LATENCY, the JPEG compression quality will be 95. If the capture mode is CAPTURE_MODE_MAXIMIZE_QUALITY, the JPEG compression quality will be 100."
Bug: 142856426
Test: ./gradlew camera:camera-core:build && ./gradlew camera:camera-core:connectedAndroidTest
Change-Id: Ieb37cfede4173d165bd481b86a04545887b0d487
M camera/camera-core/src/androidTest/java/androidx/camera/core/ImageSaverTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageSaver.java
M camera/camera-core/src/main/java/androidx/camera/core/internal/utils/ImageUtil.java
M camera/camera-core/src/test/java/androidx/camera/core/internal/utils/ImageUtilTest.java
ch...@google.com <ch...@google.com> #11
About the below issue mentioned in
in case the picture is cropped (which is not my case), the compression quality is set to 100
The issue has been fixed by
Bug Fixes
- When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is CAPTURE_MODE_MINIMIZE_LATENCY, the JPEG compression quality will be 95. If the capture mode is CAPTURE_MODE_MAXIMIZE_QUALITY, the JPEG compression quality will be 100.
After
aa...@gmail.com <aa...@gmail.com> #12
Hello,
I have 3 buttons to set different jpedQulity to image capture use case,
Low - 30 -> file obtained is of size 300KB
Medium - 50 -> 250KB
High - 100 -> 1MB
When I pass 50 as the value, ideally the image size should increase (I have put camera on a stand, so I am clicking same view) however it’s even less than the image captured with 30 as quality.
On keenly observing this, I saw that on changing the jpeg quality to 30, the preview gets zoomed out automatically.
Can anyone help here?
Is this the default behaviour that preview will zoom out on lowering the quality?
I have 3 buttons to set different jpedQulity to image capture use case,
Low - 30 -> file obtained is of size 300KB
Medium - 50 -> 250KB
High - 100 -> 1MB
When I pass 50 as the value, ideally the image size should increase (I have put camera on a stand, so I am clicking same view) however it’s even less than the image captured with 30 as quality.
On keenly observing this, I saw that on changing the jpeg quality to 30, the preview gets zoomed out automatically.
Can anyone help here?
Is this the default behaviour that preview will zoom out on lowering the quality?
ch...@google.com <ch...@google.com> #13
Hi,
Thanks for reporting this. I have created
aa...@gmail.com <aa...@gmail.com> #14
Hi Google Team,
Thanks for raising a separate ticket for my issue.
I have replied to the asked questions on the same, please have a look.
Thanks for raising a separate ticket for my issue.
I have replied to the asked questions on the same, please have a look.
Description
I was not expecting to have the same output size, especially if we consider the different resolutions of the cameras, but I think the difference is in this case too much.
I see that CameraX is currently not specifying the compression quality, so I assume each device uses whatever the manufacturer defined. It would be great to have a way to define the compression quality not to have to manually compress the JPEG, which is can easily lead to OOM issues.
Related to this, I also noticed that in case the picture is cropped (which is not my case), the compression quality is set to 100, which may not be desired.