AlbLib.Imaging.ImageBase.Disassemble C# (CSharp) Method

Disassemble() public static method

public static Disassemble ( byte arr ) : byte[]
arr byte
return byte[]
        public static byte[] Disassemble(byte[,] arr)
        {
            byte[] result = new byte[arr.Length];
            int width = arr.GetLength(0);
            int height = arr.GetLength(1);
            for(int y = 0; y < width; y++)
            for(int x = 0; x < height; x++)
            {
                result[y*width+x] = arr[x,y];
            }
            return result;
        }