如何在没有安装编解码器的情况下解码/打开类似.CR2或.NEF和.ARW这样的原始图像文件,就像Lightroom打开原始文件一样?我的代码看起来像这样:
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 格式。