/// <summary>
        /// public static void Main(String[] args) {
        /// try {
        /// RandomAccessFileOrArray inp = new RandomAccessFileOrArray(args[0]);
        /// Stream outp = new FileOutputStream(args[1]);
        /// Convert(inp, outp);
        /// inp.Close();
        /// outp.Close();
        /// }
        /// catch (Exception e) {
        /// e.PrintStackTrace();
        /// }
        /// }
        /// </summary>

        private void openpfm()
        {
            _inp.Seek(0);
            _vers       = _inp.ReadShortLe();
            _hLen       = _inp.ReadIntLe();
            _copyright  = readString(60);
            _type       = _inp.ReadShortLe();
            _points     = _inp.ReadShortLe();
            _verres     = _inp.ReadShortLe();
            _horres     = _inp.ReadShortLe();
            _ascent     = _inp.ReadShortLe();
            _intleading = _inp.ReadShortLe();
            _extleading = _inp.ReadShortLe();
            _italic     = (byte)_inp.Read();
            _uline      = (byte)_inp.Read();
            _overs      = (byte)_inp.Read();
            _weight     = _inp.ReadShortLe();
            _charset    = (byte)_inp.Read();
            _pixwidth   = _inp.ReadShortLe();
            _pixheight  = _inp.ReadShortLe();
            _kind       = (byte)_inp.Read();
            _avgwidth   = _inp.ReadShortLe();
            _maxwidth   = _inp.ReadShortLe();
            _firstchar  = _inp.Read();
            _lastchar   = _inp.Read();
            _defchar    = (byte)_inp.Read();
            _brkchar    = (byte)_inp.Read();
            _widthby    = _inp.ReadShortLe();
            _device     = _inp.ReadIntLe();
            _face       = _inp.ReadIntLe();
            _bits       = _inp.ReadIntLe();
            _bitoff     = _inp.ReadIntLe();
            _extlen     = _inp.ReadShortLe();
            _psext      = _inp.ReadIntLe();
            _chartab    = _inp.ReadIntLe();
            _res1       = _inp.ReadIntLe();
            _kernpairs  = _inp.ReadIntLe();
            _res2       = _inp.ReadIntLe();
            _fontname   = _inp.ReadIntLe();
            if (_hLen != _inp.Length || _extlen != 30 || _fontname < 75 || _fontname > 512)
            {
                throw new IOException("Not a valid PFM file.");
            }

            _inp.Seek(_psext + 14);
            _capheight = _inp.ReadShortLe();
            _xheight   = _inp.ReadShortLe();
            _ascender  = _inp.ReadShortLe();
            _descender = _inp.ReadShortLe();
        }