///////////////////////////////////////////////////////////////////////////
        private void LoadImage(BinaryReverseReader reader)
        {
            Debug.WriteLine("LoadImage started at " + reader.BaseStream.Position.ToString());

              m_imageCompression = (ImageCompression)reader.ReadInt16();

              m_imageData = new byte[m_channels][];

              //---------------------------------------------------------------

              if (m_imageCompression == ImageCompression.Rle)
              {
            // The RLE-compressed data is proceeded by a 2-byte data count for each row in the data,
            // which we're going to just skip.
            reader.BaseStream.Position += m_rows * m_channels * 2;
              }

              //---------------------------------------------------------------

              int bytesPerRow = 0;

              switch (m_depth)
              {
            case 1:
              bytesPerRow = m_columns;//NOT Shure
              break;
            case 8:
              bytesPerRow = m_columns;
              break;
            case 16:
              bytesPerRow = m_columns * 2;
              break;
              }

              //---------------------------------------------------------------

              for (int ch = 0; ch < m_channels; ch++)
              {
            m_imageData[ch] = new byte[m_rows * bytesPerRow];

            switch (m_imageCompression)
            {
              case ImageCompression.Raw:
            reader.Read(m_imageData[ch], 0, m_imageData[ch].Length);
            break;
              case ImageCompression.Rle:
            {
              for (int i = 0; i < m_rows; i++)
              {
                int rowIndex = i * m_columns;
                RleHelper.DecodedRow(reader.BaseStream, m_imageData[ch], rowIndex, bytesPerRow);
              }
            }
            break;
              default:
            break;
            }
              }
        }