-
public class PictureResultWraps the picture captured by takePicture or takePictureSnapshot.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPictureResult.StubA result stub, for internal use only.
-
Method Summary
Modifier and Type Method Description booleanisSnapshot()Returns whether this result comes from a snapshot. LocationgetLocation()Returns geographic information for this picture, if any.If it was set, it is also present in the file metadata. intgetRotation()Returns the clock-wise rotation that should be applied to thepicture before displaying. SizegetSize()Returns the size of the picture after the rotation is applied. FacinggetFacing()Returns the facing value with which this video was recorded. Array<byte>getData()Returns the raw compressed, ready to be saved to file,in the given format. PictureFormatgetFormat()Returns the format for getData. voidtoBitmap(int maxWidth, int maxHeight, @NonNull() BitmapCallback callback)Shorthand for decodeBitmap.Decodes this picture on a background thread and posts the result in the UI thread usingthe given callback. voidtoBitmap(@NonNull() BitmapCallback callback)Shorthand for decodeBitmap.Decodes this picture on a background thread and posts the result in the UI thread usingthe given callback. voidtoFile(@NonNull() File file, @NonNull() FileCallback callback)Shorthand for writeToFile.This writes this picture to file on a background thread and posts the result in the UIthread using the given callback. -
-
Method Detail
-
isSnapshot
boolean isSnapshot()
Returns whether this result comes from a snapshot.
-
getLocation
@Nullable() Location getLocation()
Returns geographic information for this picture, if any.If it was set, it is also present in the file metadata.
-
getRotation
int getRotation()
Returns the clock-wise rotation that should be applied to thepicture before displaying. If it is non-zero, it is also presentin the EXIF metadata.
-
getFacing
@NonNull() Facing getFacing()
Returns the facing value with which this video was recorded.
-
getData
@NonNull() Array<byte> getData()
Returns the raw compressed, ready to be saved to file,in the given format.
-
getFormat
@NonNull() PictureFormat getFormat()
Returns the format for getData.
-
toBitmap
void toBitmap(int maxWidth, int maxHeight, @NonNull() BitmapCallback callback)
Shorthand for decodeBitmap.Decodes this picture on a background thread and posts the result in the UI thread usingthe given callback.
- Parameters:
maxWidth- the max.maxHeight- the max.callback- a callback to be notified of image decoding
-
toBitmap
void toBitmap(@NonNull() BitmapCallback callback)
Shorthand for decodeBitmap.Decodes this picture on a background thread and posts the result in the UI thread usingthe given callback.
- Parameters:
callback- a callback to be notified of image decoding
-
toFile
void toFile(@NonNull() File file, @NonNull() FileCallback callback)
Shorthand for writeToFile.This writes this picture to file on a background thread and posts the result in the UIthread using the given callback.
- Parameters:
file- the file to write intocallback- a callback
-
-
-
-