Class ImageCaptureModel
-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class ImageCaptureModel implements Closeable
The captured image and supporting information.
-
-
Field Summary
Fields Modifier and Type Field Description private final Imageimageprivate final CaptureResultmetadataprivate final Integerorientationprivate final Integerformat
-
Constructor Summary
Constructors Constructor Description ImageCaptureModel(Image image, CaptureResult metadata, Integer orientation, Integer format)
-
Method Summary
Modifier and Type Method Description final ImagegetImage()final CaptureResultgetMetadata()final IntegergetOrientation()final IntegergetFormat()Unitclose()final BitmapgetBitmap(Context context, Boolean correctOrientation, BitmapFactory.Options opts)Transforms the image to a bitmap. -
-
Constructor Detail
-
ImageCaptureModel
ImageCaptureModel(Image image, CaptureResult metadata, Integer orientation, Integer format)
- Parameters:
image- the image that was captured.metadata- metadata including orientation information.orientation- will be one of ExifInterface.ORIENTATION_UNDEFINED, ExifInterface.ORIENTATION_NORMAL, ExifInterface.ORIENTATION_FLIP_HORIZONTAL, ExifInterface.ORIENTATION_ROTATE_180, ExifInterface.ORIENTATION_FLIP_VERTICAL, ExifInterface.ORIENTATION_TRANSPOSE, ExifInterface.ORIENTATION_ROTATE_90, ExifInterface.ORIENTATION_TRANSVERSE, ExifInterface.ORIENTATION_ROTATE_270.format- @see android.media.ImageReader.getImageFormat.
-
-
Method Detail
-
getMetadata
final CaptureResult getMetadata()
-
getOrientation
final Integer getOrientation()
-
getBitmap
final Bitmap getBitmap(Context context, Boolean correctOrientation, BitmapFactory.Options opts)
Transforms the image to a bitmap.
- Parameters:
context- required to transform YUV formatted images.correctOrientation- if true, will be transformed to have the correct orientation.opts- if resizing is required, provide opts.
-
-
-
-