From ac6aa9ce10a0f89c929557209d591f7d44bf1cb0 Mon Sep 17 00:00:00 2001 From: Jiuqiang Tang Date: Wed, 2 Nov 2022 15:55:19 -0700 Subject: [PATCH] Fix a bug in the AndroidPacketCreator's createImage method. PiperOrigin-RevId: 485716828 --- .../com/google/mediapipe/framework/AndroidPacketCreator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediapipe/java/com/google/mediapipe/framework/AndroidPacketCreator.java b/mediapipe/java/com/google/mediapipe/framework/AndroidPacketCreator.java index e3a878f91..05700ba17 100644 --- a/mediapipe/java/com/google/mediapipe/framework/AndroidPacketCreator.java +++ b/mediapipe/java/com/google/mediapipe/framework/AndroidPacketCreator.java @@ -90,7 +90,7 @@ public class AndroidPacketCreator extends PacketCreator { int height = image.getHeight(); return createImage(buffer, width, height, numChannels); } - if (properties.getImageFormat() == MPImage.STORAGE_TYPE_BITMAP) { + if (properties.getStorageType() == MPImage.STORAGE_TYPE_BITMAP) { Bitmap bitmap = BitmapExtractor.extract(image); if (bitmap.getConfig() != Bitmap.Config.ARGB_8888) { throw new UnsupportedOperationException("bitmap must use ARGB_8888 config."); @@ -100,7 +100,7 @@ public class AndroidPacketCreator extends PacketCreator { // Unsupported type. throw new UnsupportedOperationException( - "Unsupported Image container type: " + properties.getImageFormat()); + "Unsupported Image container type: " + properties.getStorageType()); } /**