示例#1
0
        private static IStci LoadStci(BinaryReader _br, string aFileName)
        {
            IStci      _stci   = null;
            StciHeader _header = new StciHeader();

            _header.Read(_br);

            if (_header.IsIndexed)
            {
                _stci = new StciIndexed(_header, aFileName);
                _stci.Load(_br);
            }
            else
            {
                _stci = new StciRgb(_header, aFileName);
                _stci.Load(_br);
            }
            return(_stci);
        }
示例#2
0
        public static IStci LoadStci(string aFileName)
        {
            using (FileStream _fs = new FileStream(aFileName, FileMode.Open))
            {
                using (BinaryReader _br = new BinaryReader(_fs))
                {
                    IStci      _stci   = null;
                    StciHeader _header = new StciHeader();
                    _header.Read(_br);

                    if (_header.IsIndexed)
                    {
                        _stci = new StciIndexed(_header, aFileName);
                        _stci.Load(_br);
                    }
                    else
                    {
                        _stci = new StciRgb(_header, aFileName);
                        _stci.Load(_br);
                    }
                    return(_stci);
                }
            }
        }