I am trying to work on my Nexus 5x with android Camera2 APIs and I am using
googlesamples
android-Camera2Basic <https://github.com/googlesamples/android-Camera2Basic>
My problem is that the JPEG images have too low quality and their size is
much smaller that regular images I am taking with my phone camera app.
According to google documents there should be a key "JPEG_QUALITY" both in
CaptureRequest and in CaptureResult:
"JPEG_QUALITY
Added in API level 21 Key JPEG_QUALITY Compression quality of the final
JPEG image.
85-95 is typical usage range.
Range of valid values: 1-100; larger is higher quality
This key is available on all devices."
However when I ask for the available keys, JPEG_QUALITY key is not
available so I don't how to know what is my current JPEG compression
quallity used and how I can change it.
The code I did inside:
CameraCaptureSession.CaptureCallback CaptureCallback = new
CameraCaptureSession.CaptureCallback() {
@Override
public void onCaptureCompleted(@NonNull CameraCaptureSession
session,
@NonNull CaptureRequest request,
@NonNull TotalCaptureResult result) {
//_TEST_DEBUG
List<CaptureRequest.Key<?>> requestKeys = request.getKeys();
List<CaptureResult.Key<?>> resultKeys = result.getKeys();
requestKeys & resultKeys have many keys including JPEG_ORIENTATION but not
the JPEG_QUALITY key.
Any idea what am I doing wrong? Why can't I find how to change JPEG
compression quality?
Thanks,
Guy
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/e1d68722-6969-4d77-8632-6d3f71316cac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.