ExifRotationAvailability

@RequiresApi(21) open class ExifRotationAvailability
kotlin.Any
   ↳ androidx.camera.core.internal.compat.workaround.ExifRotationAvailability

Workaround to check whether the exif rotation value embedded in the capture JPEG image is available.

Summary

Public constructors

Workaround to check whether the exif rotation value embedded in the capture JPEG image is available.

Public methods
open Boolean

Returns whether rotation option is supported on the device.

open Boolean

Checks whether the exif orientation value should be used for the final output image.

Public constructors

ExifRotationAvailability

ExifRotationAvailability()

Workaround to check whether the exif rotation value embedded in the capture JPEG image is available.

Public methods

isRotationOptionSupported

open fun isRotationOptionSupported(): Boolean

Returns whether rotation option is supported on the device.

shouldUseExifOrientation

open fun shouldUseExifOrientation(@NonNull image: ImageProxy): Boolean

Checks whether the exif orientation value should be used for the final output image.

On some devices, the orientation value in the embedded exif of the captured images may be 0 but the image buffer data actually is not rotated to upright orientation by HAL. For these devices, the exif orientation value should not be used for the final output image.

Parameters
image ImageProxy: The captured image object.