ImageInfo
public
interface
ImageInfo
androidx.camera.core.ImageInfo |
Metadata for an image.
Summary
Public methods | |
---|---|
abstract
int
|
getRotationDegrees()
Returns the rotation needed to transform the image to the correct orientation. |
abstract
long
|
getTimestamp()
Returns the timestamp of the metadata. |
Public methods
getRotationDegrees
public abstract int getRotationDegrees ()
Returns the rotation needed to transform the image to the correct orientation.
This is a clockwise rotation in degrees that needs to be applied to the image buffer.
Note that for images that are in ImageFormat.JPEG
this value will
match the rotation defined in the EXIF.
The target rotation is set at the time the image capture was requested.
The correct orientation of the image is dependent upon the producer of the image. For
example, if the ImageProxy
that contains this instance of ImageInfo is produced
by an ImageCapture
, then the rotation will be determined by
ImageCapture.setTargetRotation(int)
or
ImageCapture.Builder.setTargetRotation(int)
.
Returns | |
---|---|
int |
The rotation in degrees which will be a value in {0, 90, 180, 270}. |
getTimestamp
public abstract long getTimestamp ()
Returns the timestamp of the metadata. Details on the timestamp depend on the source providing the image, and the method providing the image contains more documentation.
Returns | |
---|---|
long |
the timestamp of the image |