diff --git a/hgdriver/hgdev/image_process.cpp b/hgdriver/hgdev/image_process.cpp index 2a62779..21f8c4c 100644 --- a/hgdriver/hgdev/image_process.cpp +++ b/hgdriver/hgdev/image_process.cpp @@ -546,6 +546,14 @@ namespace hg_imgproc else mats_.push_back(Temp_mat[0]); } + if (mats_.size() % 2 == 0 + && ((CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_clockwise + || (CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_anti_clockwise)) + { + cv::flip(mats_[1], mats_[1], 0); + cv::flip(mats_[1], mats_[1], 1); + } + } else @@ -946,14 +954,6 @@ namespace hg_imgproc Rotation.apply(mats,img_conf_.is_duplex); mats_ = mats; - if (mats_.size() % 2 == 0 - && ((CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_clockwise - || (CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_anti_clockwise)) - { - cv::flip(mats_[1], mats_[1],0); - cv::flip(mats_[1], mats_[1], 1); - } - if (mats_.empty()) { return SCANNER_ERR_NO_DATA;