BitMiracle.LibJpeg.Classic.jpeg_source_mgr.GetBytes C# (CSharp) Method

GetBytes() public method

Gets the bytes.
public GetBytes ( byte dest, int amount ) : int
dest byte The destination.
amount int The amount.
return int
        public virtual int GetBytes(byte[] dest, int amount)
        {
            int avail = amount;
            if (avail > m_bytes_in_buffer)
                avail = m_bytes_in_buffer;

            for (int i = 0; i < avail; i++)
            {
                dest[i] = m_next_input_byte[m_position];
                m_position++;
                m_bytes_in_buffer--;
            }

            return avail;
        }