From 34008471d5eda56398b84f07b07ae29fe249c58e Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 23 Sep 2010 20:54:36 +0100 Subject: [PATCH 1/2] Fix bounds for transparent borders --- modules/imgproc/src/imgwarp.cpp | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index c263b5e..6a688e8 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -2175,9 +2175,7 @@ static void remapBicubic( const Mat& _src, Mat& _dst, const Mat& _xy, else { int x[4], y[4]; - if( borderType == BORDER_TRANSPARENT && - ((unsigned)(sx+1) >= (unsigned)ssize.width || - (unsigned)(sy+1) >= (unsigned)ssize.height) ) + if( borderType == BORDER_TRANSPARENT ) continue; if( borderType == BORDER_CONSTANT && @@ -2277,9 +2275,7 @@ static void remapLanczos4( const Mat& _src, Mat& _dst, const Mat& _xy, else { int x[8], y[8]; - if( borderType == BORDER_TRANSPARENT && - ((unsigned)(sx+3) >= (unsigned)ssize.width || - (unsigned)(sy+3) >= (unsigned)ssize.height) ) + if( borderType == BORDER_TRANSPARENT ) continue; if( borderType == BORDER_CONSTANT && -- 1.6.5