BaconographyW8.PlatformServices.ImagesService.MergePixelArrays C# (CSharp) Method

MergePixelArrays() private static method

private static MergePixelArrays ( byte largeArray, uint lWidth, uint lHeight, byte smallArray, uint sWidth, uint sHeight, uint widthOffset, uint heightOffset ) : byte[]
largeArray byte
lWidth uint
lHeight uint
smallArray byte
sWidth uint
sHeight uint
widthOffset uint
heightOffset uint
return byte[]
        private static byte[] MergePixelArrays(byte[] largeArray, uint lWidth, uint lHeight, byte[] smallArray, uint sWidth, uint sHeight, uint widthOffset, uint heightOffset)
        {

            for (uint rows = heightOffset, sRows = 0; sRows < sHeight; rows++, sRows++)
            {
                for (uint cols = widthOffset, sCols = 0; sCols < sWidth; cols++, sCols++)
                {
                    largeArray[(lWidth * rows + cols) * 4 + 0] = smallArray[(sWidth * sRows + sCols) * 4 + 0];
                    largeArray[(lWidth * rows + cols) * 4 + 1] = smallArray[(sWidth * sRows + sCols) * 4 + 1];
                    largeArray[(lWidth * rows + cols) * 4 + 2] = smallArray[(sWidth * sRows + sCols) * 4 + 2];
                    largeArray[(lWidth * rows + cols) * 4 + 3] = smallArray[(sWidth * sRows + sCols) * 4 + 3];
                }
            }

            return largeArray;
        }