|
|
|
@ -135,8 +135,13 @@ public class PictureResult { |
|
|
|
|
* @param callback a callback to be notified of image decoding |
|
|
|
|
*/ |
|
|
|
|
public void toBitmap(int maxWidth, int maxHeight, @NonNull BitmapCallback callback) { |
|
|
|
|
CameraUtils.decodeBitmap(getData(), maxWidth, maxHeight, new BitmapFactory.Options(), |
|
|
|
|
rotation, callback); |
|
|
|
|
if (format == PictureFormat.JPEG) { |
|
|
|
|
CameraUtils.decodeBitmap(getData(), maxWidth, maxHeight, new BitmapFactory.Options(), |
|
|
|
|
rotation, callback); |
|
|
|
|
} else { |
|
|
|
|
throw new UnsupportedOperationException("PictureResult.toBitmap() does not support " |
|
|
|
|
+ "this picture format: " + format); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|