Commit 5633cf03 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

one more fix in the recently rewritten copyMakeBorder

parent 39700c5d
......@@ -113,7 +113,7 @@ static void copyMakeBorder_8u( const uchar* src, int srcstep, Size srcroi,
left *= cn;
right *= cn;
uchar* dstInner = dst + (dststep*top + left)*elemSize;
uchar* dstInner = dst + dststep*top + left*elemSize;
for( i = 0; i < srcroi.height; i++, dstInner += dststep, src += srcstep )
{
......@@ -183,7 +183,7 @@ static void copyMakeConstBorder_8u( const uchar* src, int srcstep, Size srcroi,
if( dstInner != src )
memcpy( dstInner, src, srcroi.width );
memcpy( dstInner - left, constBuf, left );
memcpy( dstInner + srcroi.width, constBuf + left, right );
memcpy( dstInner + srcroi.width, constBuf, right );
}
dst += dststep*top;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment