From 5988311cbbde38e09e3cc743e6a398034968ed55 Mon Sep 17 00:00:00 2001 From: Yin-Chia Yeh Date: Mon, 22 Jun 2015 15:51:40 -0700 Subject: [PATCH] Camera: document expected thumbnail size in capture result Codegen document update only. Bug: 21880406 Change-Id: I058f6af62ff341943f7fdf6eefe8303431211970 --- .../android/hardware/camera2/CaptureRequest.java | 13 +++++++++++++ .../android/hardware/camera2/CaptureResult.java | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index bc625dd311689..b05adae478887 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -1759,11 +1759,24 @@ public final class CaptureRequest extends CameraMetadata> * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to * generate the thumbnail image. The thumbnail image will always have a smaller Field * Of View (FOV) than the primary image when aspect ratios differ.

+ *

When an {@link CaptureRequest#JPEG_ORIENTATION android.jpeg.orientation} of non-zero degree is requested, + * the camera device will handle thumbnail rotation in one of the following ways:

+ * *

Range of valid values:
* {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}

*

This key is available on all devices.

* * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES + * @see CaptureRequest#JPEG_ORIENTATION */ @PublicKey public static final Key JPEG_THUMBNAIL_SIZE = diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index da216aaa4418c..1ae8fb9785cf6 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -2314,11 +2314,24 @@ public class CaptureResult extends CameraMetadata> { * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to * generate the thumbnail image. The thumbnail image will always have a smaller Field * Of View (FOV) than the primary image when aspect ratios differ.

+ *

When an {@link CaptureRequest#JPEG_ORIENTATION android.jpeg.orientation} of non-zero degree is requested, + * the camera device will handle thumbnail rotation in one of the following ways:

+ *
    + *
  • Set the {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag} + * and keep jpeg and thumbnail image data unrotated.
  • + *
  • Rotate the jpeg and thumbnail image data and not set + * {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}. In this + * case, LIMITED or FULL hardware level devices will report rotated thumnail size in + * capture result, so the width and height will be interchanged if 90 or 270 degree + * orientation is requested. LEGACY device will always report unrotated thumbnail + * size.
  • + *
*

Range of valid values:
* {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}

*

This key is available on all devices.

* * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES + * @see CaptureRequest#JPEG_ORIENTATION */ @PublicKey public static final Key JPEG_THUMBNAIL_SIZE =