diff --git a/model_zoo/official/lite/Himindspore/imageObject/src/main/java/com/mindspore/imageobject/objectdetection/ui/ObjectPhotoActivity.java b/model_zoo/official/lite/Himindspore/imageObject/src/main/java/com/mindspore/imageobject/objectdetection/ui/ObjectPhotoActivity.java index 1781120d9e..e52b3c3d44 100644 --- a/model_zoo/official/lite/Himindspore/imageObject/src/main/java/com/mindspore/imageobject/objectdetection/ui/ObjectPhotoActivity.java +++ b/model_zoo/official/lite/Himindspore/imageObject/src/main/java/com/mindspore/imageobject/objectdetection/ui/ObjectPhotoActivity.java @@ -100,7 +100,7 @@ public class ObjectPhotoActivity extends AppCompatActivity { Pair targetedSize = this.getTargetSize(); int targetWidth = targetedSize.first; int maxHeight = targetedSize.second; - originBitmap = BitmapUtils.loadFromPath(ObjectPhotoActivity.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(ObjectPhotoActivity.TAG, "resized image size width:" + originBitmap.getWidth() + ",height: " + originBitmap.getHeight());