!10268 [MS][LITE]20201216 detection demo check some photos exits unexpectedly

From: @sishuikang
Reviewed-by: @zhanghaibo5,@zhang_xue_tong
Signed-off-by: @zhanghaibo5
This commit is contained in:
mindspore-ci-bot 2020-12-21 14:18:47 +08:00 committed by Gitee
commit a207deab73
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ public class PhotoActivity extends AppCompatActivity {
Pair<Integer, Integer> targetedSize = this.getTargetSize();
int targetWidth = targetedSize.first;
int maxHeight = targetedSize.second;
originBitmap = BitmapUtils.loadFromPath(this, imageUri, targetWidth, maxHeight);
originBitmap = BitmapUtils.loadFromPath(this, imageUri, targetWidth, maxHeight).copy(Bitmap.Config.ARGB_8888, true);
// Determine how much to scale down the image.
Log.i(TAG, "resized image size width:" + originBitmap.getWidth() + ",height: " + originBitmap.getHeight());
if (originBitmap != null) {