Updated error with info about unsupported mirrored orientations in MPPVisionTaskRunner

This commit is contained in:
Prianka Liz Kariat 2023-03-03 12:19:14 +05:30
parent 6253966901
commit fee66069ac

View File

@ -113,9 +113,13 @@ using ::mediapipe::tasks::core::PacketsCallback;
break;
}
default:
[MPPCommonUtils createCustomError:error
[MPPCommonUtils
createCustomError:error
withCode:MPPTasksErrorCodeInvalidArgumentError
description:@"Unsupported UIImageOrientation."];
description:@"Unsupported UIImageOrientation. `imageOrientation` cannot be equal to "
@"any of the mirrored orientations "
@"(`UIImageOrientationUpMirrored`,`UIImageOrientationDownMirrored`,`"
@"UIImageOrientationLeftMirrored`,`UIImageOrientationRightMirrored`)"];
}
normalizedRect.set_rotation(-rotationDegrees * M_PI / 180.0);