diff --git a/samples/augmented_image_c/app/src/main/cpp/util.cc b/samples/augmented_image_c/app/src/main/cpp/util.cc index e49f65c436..2426b66c95 100644 --- a/samples/augmented_image_c/app/src/main/cpp/util.cc +++ b/samples/augmented_image_c/app/src/main/cpp/util.cc @@ -256,7 +256,7 @@ bool LoadImageFromAssetManager(const std::string& path, int* out_width, ANDROID_BITMAP_RESULT_SUCCESS); // Copy jvm_buffer_address to pixel_buffer_address - int32_t total_size_in_byte = bitmap_info.stride * bitmap_info.width; + int32_t total_size_in_byte = bitmap_info.stride * bitmap_info.height; *out_pixel_buffer = new uint8_t[total_size_in_byte]; memcpy(*out_pixel_buffer, jvm_buffer, total_size_in_byte);