From c18bf68d9f49964b13f1f5ec4810f1a4256cb984 Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Fri, 1 Jun 2018 07:34:19 +1200 Subject: [PATCH] Tidies up decodeBitmap javadoc --- .../com/otaliastudios/cameraview/CameraUtils.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraUtils.java b/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraUtils.java index 23dbbcdd..dd7a74e2 100644 --- a/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraUtils.java +++ b/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraUtils.java @@ -60,7 +60,6 @@ public class CameraUtils { * Decodes an input byte array and outputs a Bitmap that is ready to be displayed. * The difference with {@link android.graphics.BitmapFactory#decodeByteArray(byte[], int, int)} * is that this cares about orientation, reading it from the EXIF header. - * This is executed in a background thread, and returns the result to the original thread. * * @param source a JPEG byte array */ @@ -115,6 +114,17 @@ public class CameraUtils { } + /** + * Decodes an input byte array and outputs a Bitmap that is ready to be displayed. + * The difference with {@link android.graphics.BitmapFactory#decodeByteArray(byte[], int, int)} + * is that this cares about orientation, reading it from the EXIF header. + * + * The image is also downscaled taking care of the maxWidth and maxHeight arguments. + * + * @param source a JPEG byte array + * @param maxWidth the max allowed width + * @param maxHeight the max allowed height + */ // TODO ignores flipping @SuppressWarnings({"SuspiciousNameCombination", "WeakerAccess"}) @WorkerThread