Ejemplo n.º 1
0
            public byte[] ToByteArray()
            {
                var array = new byte[20];

                EngineBase.getSwappedArray(8).CopyTo(array, 0);
                Encoding.Default.GetBytes("acTL").CopyTo(array, 4);
                EngineBase.getSwappedArray((int)num_frames).CopyTo(array, 8);
                EngineBase.getSwappedArray((int)num_plays).CopyTo(array, 12);
                EngineBase.getSwappedCrc(array.Skip(4).Take(12).ToArray()).CopyTo(array, 16);
                return(array);
            }
Ejemplo n.º 2
0
            public byte[] ToByteArray()
            {
                var array = new byte[25];

                EngineBase.getSwappedArray(13).CopyTo(array, 0);
                Encoding.Default.GetBytes("IHDR").CopyTo(array, 4);
                EngineBase.getSwappedArray((int)width).CopyTo(array, 8);
                EngineBase.getSwappedArray((int)height).CopyTo(array, 12);
                EngineBase.getSwappedArray(bit_depth).CopyTo(array, 16);
                EngineBase.getSwappedArray(color_type).CopyTo(array, 17);
                EngineBase.getSwappedArray(compression_method).CopyTo(array, 18);
                EngineBase.getSwappedArray(filter_method).CopyTo(array, 19);
                EngineBase.getSwappedArray(interlace_method).CopyTo(array, 20);
                EngineBase.getSwappedCrc(array.Skip(4).Take(17).ToArray()).CopyTo(array, 21);
                return(array);
            }
Ejemplo n.º 3
0
            public byte[] ToByteArray()
            {
                var array = new byte[38];

                EngineBase.getSwappedArray(26).CopyTo(array, 0);
                Encoding.Default.GetBytes("fcTL").CopyTo(array, 4);
                EngineBase.getSwappedArray((int)sequence_number).CopyTo(array, 8);
                EngineBase.getSwappedArray((int)width).CopyTo(array, 12);
                EngineBase.getSwappedArray((int)height).CopyTo(array, 16);
                EngineBase.getSwappedArray((int)x_offset).CopyTo(array, 20);
                EngineBase.getSwappedArray((int)y_offset).CopyTo(array, 24);
                EngineBase.getSwappedArray((short)delay_num).CopyTo(array, 28);
                EngineBase.getSwappedArray((short)delay_den).CopyTo(array, 30);
                EngineBase.getSwappedArray(dispose_op).CopyTo(array, 32);
                EngineBase.getSwappedArray(blend_op).CopyTo(array, 33);
                EngineBase.getSwappedCrc(array.Skip(4).Take(26).ToArray()).CopyTo(array, 34);
                return(array);
            }