File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ private int CalculateBottom()
9494 {
9595 int threshold = Threshold ;
9696 int stride = _captureZone . Stride ;
97- for ( int row = _captureZone . Height ; row >= 0 ; row -- )
97+ for ( int row = _captureZone . Height - 1 ; row >= 0 ; row -- )
9898 {
9999 Span < byte > data = new ( _captureZone . Buffer , row * stride , stride ) ;
100100 for ( int i = 0 ; i < data . Length ; i += 4 )
@@ -125,7 +125,7 @@ private int CalculateRight()
125125 int threshold = Threshold ;
126126 int stride = _captureZone . Stride ;
127127 byte [ ] buffer = _captureZone . Buffer ;
128- for ( int column = _captureZone . Width ; column >= 0 ; column -- )
128+ for ( int column = _captureZone . Width - 1 ; column >= 0 ; column -- )
129129 for ( int row = 0 ; row < _captureZone . Height ; row ++ )
130130 {
131131 int offset = ( stride * row ) + ( column * 4 ) ;
You can’t perform that action at this time.
0 commit comments