ExifRotationAvailability

public class ExifRotationAvailability


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

Summary

Public methods

@NonNull boolean

Returns whether rotation option is supported on the device.

@NonNull boolean

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

Public methods

isRotationOptionSupported

@NonNull
public boolean isRotationOptionSupported()

Returns whether rotation option is supported on the device.

shouldUseExifOrientation

@NonNull
public boolean shouldUseExifOrientation(@NonNull ImageProxy image)

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
@NonNull ImageProxy image

The captured image object.