画像処理を行うプログラムを書いています。生のバイナリ ファイルを扱っており、生のファイルから 16 ビット バッファにデータを書き込む必要があります。私はほとんどそれを手に入れましたが、変換を行う方法がよくわかりません。これまでの私のコードは次のとおりです。
        Int16[] pixelBuffer;
        String inFile;
        String outFile;        
        /// Constructor. Allocates space for 3032x2016 16-bit values.
        /// <param name="inputFile">Name of the binary input file to be read.</param>
        /// <param name="outputFile">Name of the binary output file to be written.</param>
        public ColorCorrector(String inputFile, String outputFile)
        {
        this.inFile = inputFile;
        this.outFile = outputFile;
        this.pixelBuffer = new Int16[6112512];
        //I need to open the binary file 'inputFile' and store 16-bit values in pixelBuffer.
    }
どんな助けでも大歓迎です!