4

コーデックをインストールせずに、.CR2、.NEF、.ARW などの未加工の画像ファイルをデコード/開くにはどうすればよいですか? 私のコードは次のようになります。

if (fe == "CR2" | fe == "NEF" | fe == "ARW" )
{
    BitmapDecoder bmpDec = BitmapDecoder.Create(new Uri(op.FileName), BitmapCreateOptions.DelayCreation, BitmapCacheOption.None);

    BitmapSource bsource = bmpDec.Frames[0];
    info_box.Content = fe;
    imgControl.Source = bsource;
}

これは、未加工のコーデックがインストールされている場合にのみ機能し、ARW 形式では機能しません。

4

2 に答える 2