Resolution, Zoom, Night Mode Issues
On a Samsung A16 4G running stock One UI 6, I've encountered several issues with the GrapheneOS camera application:
- Resolution: The camera captures images at a fixed 2 megapixels, significantly lower than the stock Samsung camera's 12-megapixel default and optional 50-megapixel mode.
- Zoom: The maximum zoom level is limited to 4x, compared to the stock camera's 10x capability.
- Night Mode: The night mode feature, as advertised in Play Store screenshots, is absent, despite the device's hardware support.
These limitations impact the camera's usability. I'd appreciate it if these issues could be investigated.
Hi @fesowowako,
On a Samsung A16 4G running stock One UI 6, I've encountered several issues with the GrapheneOS camera application:
Resolution: The camera captures images at a fixed 2 megapixels, significantly lower than the stock Samsung camera's 12-megapixel default and optional 50-megapixel mode. Zoom: The maximum zoom level is limited to 4x, compared to the stock camera's 10x capability.
We aren't dealing with the resolution and the zoom capabilities directly in our camera app but rather via CameraX to keep our code much simpler and maintainable in the long run than having device specific quirks in the app code. I'll file an issue on CameraX's issue tracker regarding the resolution and zoom limitation and share the link for the same here on this thread.
Night Mode: The night mode feature, as advertised in Play Store screenshots, is absent, despite the device's hardware support.
The hardware supporting night mode isn't the same as us being able to access the vendor-specific extension and support it in our app. The reason why the app isn't showing up the extension mode is because the APIs report it that way.
Thanks a lot for trying out our camera app and reporting this issue!
The hardware supporting night mode isn't the same as us being able to access the vendor-specific extension and support it in our app. The reason why the app isn't showing up the extension mode is because the APIs report it that way.
Have reported the issue regarding resolution and zoom here on CameraX's issue tracker: https://issuetracker.google.com/issues/408598684
@MHShetty Thank you for the explanation about CameraX and API limitations. I'll track the CameraX issue filed for resolution/zoom. Regarding night mode, any future workarounds possible? Appreciate the info.
We are currently working on adding new modes to the camera app that should be consistently available for all devices in the process of migrating our camera app code to Jetpack Compose. Speaking specifically about re-implementing existing vendor-specific extension modes (such as night mode), we currently don't have anything planned for the same yet, but will surely let you know if we plan to work on it in the future
I noticed the gyroscope level is located below the center. It would be more user-friendly if it were placed in the middle of the screen.
My apologies for the number of reports. I just wanted to provide as much detail as possible to help with debugging.
@MHShetty, I've reviewed the response to the tracker issue, as per the provided link. Regarding the required information:
- I'm still a bit unclear on how to get the remaining values they've asked for. Any pointers on where to find that data would be appreciated.
- Yes, to answer their second point, the 2MP resolution problem with ImageCapture is happening on both the back and front cameras.
- Still need some guidance on obtaining the rest of the required values.
I noticed the gyroscope level is located below the center. It would be more user-friendly if it were placed in the middle of the screen.
We have kept it that way to ensure the user instinctively looks at the same place whether its 16:9 or 4:3 mode. The gyroscope has for those reasons has been centered with respect to 16:9 mode.
My apologies for the number of reports. I just wanted to provide as much detail as possible to help with debugging.
No worries at all mate, we appreciate all your contributions towards our repositories. Please make sure you're making a separate issue for every feature request/bug that you're referring to. It makes it easier for everyone involved to keep track of the current status of an issue for and lets others know that the issue they could have been facing has been discussed somewhere. Thank you for your time and support!
I'm still a bit unclear on how to get the remaining values they've asked for. Any pointers on where to find that data would be appreciated. Still need some guidance on obtaining the rest of the required values.
Since those values are device-specific and most likely undocumented elsewhere and since you're getting lower than what should have been supported, I would need to share an apk with the code that logs and displays those details in some way.
Yes, to answer their second point, the 2MP resolution problem with ImageCapture is happening on both the back and front cameras.
Gotcha, would share this with them when we have all of what they've requested for. I'll share an apk for the same in a while
Since those values are device-specific and most likely undocumented elsewhere and since you're getting lower than what should have been supported, I would need to share an apk with the code that logs and displays those details in some way.
Very well, then. I'll await the APK's installation; it'll simplify retrieving those details.
Hi @fesowowako,
Really sorry for the delay. Here's the link to the apk file: https://drive.proton.me/urls/15V7JEPSP8#7OqwcAXEMp1H
Each time the camera restarts (for e.g. when you switch modes or from front camera to back camera or restart the app) a dialog should appear.
When the app starts by default in the camera mode and the dialog appears click on "Copy to Clipboard" and paste the information somewhere. Type "=== Rear camera ===" above the pasted info. This would be the required information for rear camera.
Press the flip camera icon and again a dialog should appear. Click on "Copy to Clipboard" and paste the information below the previously pasted information. Type "=== Front camera ===" above the recently pasted information and below the previously pasted information. This would be the information required for the front camera.
Together this would be main information needed for the 3rd and 4th question.
Share the retrieved information here and we'll forward it to the CameraX team accordingly with the other necessary information requested. Thank you for your time and help!
@MHShetty No need for apologies. I acknowledge the effort you're putting into resolving this. Here are the requested diagnostics:
=== Rear Camera Diagnostics === Zoom Range: 1.0 - 4.0
JPEG output sizes (width x height) - 2336x2336 1920x1920 1920x1920 1440x1440 1440x1440 1280x1280 1088x1088 960x960 720x720 720x720 640x640 352x352 320x320 176x176
=== Front Camera Diagnostics === Zoom Range: 1.0 - 4.0
JPEG output sizes (width x height) - 2336x2336 1920x1920 1920x1920 1440x1440 1440x1440 1280x1280 1088x1088 960x960 720x720 720x720 640x640 352x352 320x320 176x176
Hi @fesowowako,
We've forwarded this information along with replying to the other questions they have raised on the same thread. (https://issuetracker.google.com/issues/408598684#comment8).
Thanks a lot for your time and efforts!
Hi @fesowowako,
Do you get a better image quality in 4:3 aspect ratio?
The extended zoom ratio seems to not be made available for third-party apps on your device by your vendor which could be causing this issue, Are other apps able to zoom in more than 4x on your device?
@MHShetty Right, apologies for the delayed response. I was engaged.
Now, regarding the 4:3 and 16:9 aspect ratios, they both yield the same output quality, specifically a mere 2MB, which, frankly, is substandard. I've since tested 'Open Camera', and it appears to capture images at the correct resolution, the default 12MB.
Furthermore, my testing was limited to 'Open Camera', and it's clear it cannot exceed a 4x digital zoom. Therefore, only the stock samsung camera currently possesses the capability to achieve a 10x zoom.
Regarding the resolution of the default samsung camera application, when set to a 3:4 aspect ratio, it yields 3060x4080 pixels. Conversely, the GrapheneOS camera, under a 4:3 aspect ratio, produces a resolution of 1080x1440 pixels.
Furthermore, with the samsung camera at a 9:16 aspect ratio, the resolution is 2296x4080 pixels. The GrapheneOS camera, when set to a 16:9 aspect ratio, delivers a resolution of 1080x1920 pixels.
While I'm uncertain of the utility of this information, I deemed it prudent to provide it, for your consideration.
Hi @fesowowako,
Right, apologies for the delayed response. I was engaged.
No worries, there's not
Now, regarding the 4:3 and 16:9 aspect ratios, they both yield the same output quality, specifically a mere 2MB, which, frankly, is substandard. I've since tested 'Open Camera', and it appears to capture images at the correct resolution, the default 12MB.
Furthermore, my testing was limited to 'Open Camera', and it's clear it cannot exceed a 4x digital zoom. Therefore, only the stock samsung camera currently possesses the capability to achieve a 10x zoom.
Regarding the resolution of the default samsung camera application, when set to a 3:4 aspect ratio, it yields 3060x4080 pixels. Conversely, the GrapheneOS camera, under a 4:3 aspect ratio, produces a resolution of 1080x1440 pixels.
Furthermore, with the samsung camera at a 9:16 aspect ratio, the resolution is 2296x4080 pixels. The GrapheneOS camera, when set to a 16:9 aspect ratio, delivers a resolution of 1080x1920 pixels.
Thanks a lot for all the information! We've shared it with the CameraX team on the same thread.
Could you please share the logs once again as before for this apk? It has additional information and fixes an issue that was present with the previous logging code
https://drive.proton.me/urls/8PB0WA0H78#xLcFeZLY2WrJ
(Instructions for the same quoted from an older message message)
When the app starts by default in the camera mode and the dialog appears click on "Copy to Clipboard" and paste the information somewhere. Type "=== Rear camera ===" above the pasted info. This would be the required information for rear camera.
Press the flip camera icon and again a dialog should appear. Click on "Copy to Clipboard" and paste the information below the previously pasted information. Type "=== Front camera ===" above the recently pasted information and below the previously pasted information. This would be the information required for the front camera.
Thanks a lot for your time and help!
@MHShetty
=== Rear Camera === Zoom Range: 1.0 - 4.0 List of JPEG output sizes (WxH): 2336x1080 1920x1080 1920x888 1440x1440 1440x1080 1280x720 1088x1088 960x720 720x720 720x480 640x480 352x288 320x240 176x144 List of scaler output sizes (WxH): 2336x1080 1920x1080 1920x888 1440x1440 1440x1080 1280x720 1088x1088 960x720 720x720 720x480 640x480 512x384 512x288 480x222 384x384 352x288 320x240 176x144
=== Front Camera === Zoom Range: 1.0 - 4.0 List of JPEG output sizes (WxH): 2336x1080 1920x1080 1920x888 1440x1440 1440x1080 1280x720 1088x1088 960x720 720x720 720x480 640x480 352x288 320x240 176x144 List of scaler output sizes (WxH): 2336x1080 1920x1080 1920x888 1440x1440 1440x1080 1280x720 1088x1088 960x720 720x720 720x480 640x480 512x384 512x288 480x222 384x384 352x288 320x240 176x144
Hi @fesowowako,
Thanks a lot for sharing the above information!
Could you please try this apk to see if it improves the resolution of the camera app? https://drive.proton.me/urls/5D6342ZCSG#2Ae9JwkHTz2J
Please ignore the dialog, there's no need to share the information there now. Thank you!
@MHShetty Right then, this app's finally sorted that resolution bother. It's spot on, just like when you snap a picture with samsung camera. Only little problem left is the zoom, and I'll be well pleased when that's done. Cheers for your time and the work you put in to sort this out.
Hi @fesowowako,
Thanks a lot for confirming this! We appreciate all your time and efforts you've put in to raise and provide necessary information to resolve this issue
We'd just need one last clarification before we complete this discussion, did you previously try using the "Optimize for" setting in the quick settings dialog before? Does setting it to "Quality" resolve the issue in the main production app by any chance?
One way to resolve the zoom related issue would be to request the device vendor to expose that level of zoom for third party apps within their existing zoom Camera2/CameraX APIs (not as a separate device-specific API)
@MHShetty Well, if you're on about the main stable release of the GrapheneOS camera, not these debug versions you've been sending over, then yeah, I've already had a go at setting the "optimise for" option to quality. And it was still the same low resolution and the same two-megabyte quality, mind you.
Ah gotcha, will update this thread when this issue gets resolved entirely on the library/our end.
Thanks a lot for your valuable time and efforts mate!
@MHShetty I've got a quick one for you, if you don't mind. That pull request you've just shoved through, will it only give the proper resolution and quality when I tick the "optimise for quality" option? And on the latency setting, will it be a dodgy resolution and just the two megabytes?
Yes that's right and the other setting optimizes for latency. Choosing a higher quality reduces the capture rate of the camera which makes them better off as two different capture modes from which the user can opt for.
Hi @MHShetty, I've just noticed that when you change to video, especially in places that are a bit dark, it gets much darker than it looks when you're just taking a normal photo. The usual samsung camera doesn't do that in those same dark places when you record video. So, if you could sort that out when you have some time, I'd really appreciate it. And just so you know, I can give you any logs you'd like from a test version to help you figure it out.
Also, when using the normal camera in places that are a bit dark, the brightness looks fine. But here's the thing: the picture details look really pixelated compared to the samsung camera, where it doesn't look that pixelated in the same dark places. I could provide samples of each one if you want me to. Just so you know, this is even while I'm still using your last debug version of the camera app that fixes the resolution issue. Sorry for mentioning the same video issue again instead of making a new report. Ta!
Hi @fesowowako,
Adjusting the exposure as per your requirement might help resolve the issues you're currently facing.
Sorry for mentioning the same video issue again instead of making a new report.
No worries, although filing a separate issue for each issue you are facing is always recommended and appreciated.
@MHShetty, Right then, yeah, that actually sorts out my issue, and blimey, it even shows up better and clearer details with the GrapheneOS camera when I fiddle with the exposure, even compared to the standard samsung camera app... so yeah, fair play to the GrapheneOS camera on that front. But I do wish there was a toggle or something in the settings that'd save the exposure level I've set, so I wouldn't have to muck about with it so much. And I'm ever so sorry again for bringing up something like that in an improper report. Cheers for all your hard work and the time you've put into this project, much appreciated.
Yes, there's a pull request been made for the same (Reference #527)
Currently we're mostly busy with porting our OS to Android 16, so it might take a while before things settle and the PRs for the camera app get merged.
Will update this thread whenever the PR gets merged. Alternatively, you can always subscribe to PR #527 for notifications related to the setting being updated to the camera app.
Thanks a lot for your valuable time and support!