Fix LineAA in case of 4 channel
authorTsukasa Sugiura <t.sugiura0204@gmail.com>
Fri, 11 Sep 2015 16:42:25 +0000 (01:42 +0900)
committerTsukasa Sugiura <t.sugiura0204@gmail.com>
Fri, 11 Sep 2015 16:42:25 +0000 (01:42 +0900)
Fix bug when enter 4 channel image to LineAA function.

modules/imgproc/src/drawing.cpp

index c2db764..5c4c7e7 100644 (file)
@@ -610,12 +610,12 @@ LineAA( Mat& img, Point pt1, Point pt2, const void* color )
                 ICV_PUT_POINT();
                 ICV_PUT_POINT();
 
-                tptr += step;
+                tptr += 4;
                 a = (ep_corr * FilterTable[dist] >> 8) & 0xff;
                 ICV_PUT_POINT();
                 ICV_PUT_POINT();
 
-                tptr += step;
+                tptr += 4;
                 a = (ep_corr * FilterTable[63 - dist] >> 8) & 0xff;
                 ICV_PUT_POINT();
                 ICV_PUT_POINT();