From fa60a155b26166bc9bc56ca35b388cbbd9666bc2 Mon Sep 17 00:00:00 2001 From: shenwei41 Date: Wed, 7 Apr 2021 14:53:33 +0800 Subject: [PATCH] fix BUG to preservem resize --- .../minddata/dataset/kernels/image/lite_cv/image_process.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc index 0e90b4888d..ad703a59a9 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc @@ -1721,7 +1721,7 @@ void UpdateOrientationAfineMat(const LiteMat &src, int *rotationDstWidth, int *r (*varM)[0][2] = *rotationDstWidth - 1; (*varM)[1][0] = 0; (*varM)[1][1] = -1; - (*varM)[1][2] = *rotationDstWidth - 1; + (*varM)[1][2] = *rotationDstHeight - 1; if (IM_TOOL_EXIF_ORIENTATION_180_DEG_MIRROR == srcOrientation) { /* with (*varM)irror */ (*varM)[0][0] *= -1; @@ -1753,7 +1753,7 @@ void UpdateOrientationAfineMat(const LiteMat &src, int *rotationDstWidth, int *r (*varM)[0][2] = 0; (*varM)[1][0] = -1; (*varM)[1][1] = 0; - (*varM)[1][2] = *rotationDstWidth - 1; + (*varM)[1][2] = *rotationDstHeight - 1; if (IM_TOOL_EXIF_ORIENTATION_270_DEG_MIRROR == srcOrientation) { /* with Mirror */ (*varM)[0][1] *= -1;