From cebfa1cdacfa2c471cb410c4ff4593e395f043b6 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Tue, 3 Oct 2023 23:52:58 +0530 Subject: [PATCH] Fixed error messages --- .../tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm index 76b87bcb0..1a7d840a4 100644 --- a/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm +++ b/mediapipe/tasks/ios/vision/core/utils/sources/MPPImage+Utils.mm @@ -242,7 +242,7 @@ static void FreeDataProviderReleaseCallback(void *info, const void *data, size_t default: [MPPCommonUtils createCustomError:error withCode:MPPTasksErrorCodeInternalError - description:@"Unsupported Image Format Conversion."]; + description:@"Some internal error occured."]; return NULL; } @@ -271,13 +271,13 @@ static void FreeDataProviderReleaseCallback(void *info, const void *data, size_t // Pre-multiply the raw pixels from a `mediapipe::Image` before creating a `CGImage` to ensure // that pixels are displayed correctly irrespective of their alpha values. - vImage_Error convertError = + vImage_Error premultiplyError = vImagePremultiplyData_RGBA8888(&sourceBuffer, &destBuffer, kvImageNoFlags); - if (convertError != kvImageNoError) { + if (premultiplyError != kvImageNoError) { [MPPCommonUtils createCustomError:error withCode:MPPTasksErrorCodeInternalError - description:@"Image format conversion failed."]; + description:@"Some internal error occured."]; return NULL; }