|
|
|
@ -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 |
|
|
|
|