Exemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////

        public static int EncodedRow(Stream stream, byte[] imgData, int startIdx, int columns)
        {
            long startPosition = stream.Position;

            RlePacketStateMachine machine = new RlePacketStateMachine(stream);

            machine.PushRow(imgData, startIdx, startIdx + columns);

            return((int)(stream.Position - startPosition));
        }
Exemplo n.º 2
0
        public static int EncodedRow(Stream stream, byte[] imgData, int startIdx, int columns)
        {
            var position = stream.Position;
            var rlePacketStateMachine = new RlePacketStateMachine(stream);

            for (var i = 0; i < columns; i++)
            {
                rlePacketStateMachine.Push(imgData[i + startIdx]);
            }
            rlePacketStateMachine.Flush();
            return((int)(stream.Position - position));
        }
Exemplo n.º 3
0
        ////////////////////////////////////////////////////////////////////////

        public static int EncodedRow(Stream stream, byte[] imgData, int startIdx, int columns)
        {
            long startPosition = stream.Position;

            RlePacketStateMachine machine = new RlePacketStateMachine(stream);

            for (int x = 0; x < columns; ++x)
            {
                machine.Push(imgData[x + startIdx]);
            }

            machine.Flush();

            return((int)(stream.Position - startPosition));
        }
Exemplo n.º 4
0
        ////////////////////////////////////////////////////////////////////////

        public static int EncodedRow(Stream stream, byte[] imgData, int startIdx, int columns)
        {
            long startPosition = stream.Position;

            var machine = new RlePacketStateMachine(stream);

            for (int x = 0; x < columns; ++x)
                machine.Push(imgData[x + startIdx]);

            machine.Flush();

            return (int) (stream.Position - startPosition);
        }
Exemplo n.º 5
0
        ////////////////////////////////////////////////////////////////////////
        public static int EncodedRow(Stream stream, byte[] imgData, int startIdx, int columns)
        {
            long startPosition = stream.Position;

              RlePacketStateMachine machine = new RlePacketStateMachine(stream);
              machine.PushRow(imgData, startIdx, startIdx + columns);

              return (int)(stream.Position - startPosition);
        }