private void FilterRowAverage() { int i, j, imax; imax = ImgInfo.BytesPerRow; for (j = 1 - ImgInfo.BytesPixel, i = 1; i <= imax; i++, j++) { rowbfilter[i] = (byte)(rowb[i] - ((rowbprev[i]) + (j > 0 ? rowb[j] : (byte)0)) / 2); } }