gpt4 book ai didi

c# - FormatConvertedBitmap - 找不到适合完成此操作的成像组件错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:23:07 24 4
gpt4 key购买 nike

我使用下面的代码将 RGB tif 文件转换为 CMYK 格式。它在我的本地开发机器 (Windows 7) 上运行良好,但在我们的 Windows 2003 生产服务器上抛出此错误。

错误:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[NotSupportedException:找不到适合完成此操作的成像组件。] 系统.Windows.Media.Imaging.FormatConvertedBitmap.FinalizeCreation() +376 System.Windows.Media.Imaging.FormatConvertedBitmap.EndInit() +158~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

下面是我使用的代码:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FormatConvertedBitmap newFormatedBitmapSource = new FormatConvertedBitmap(); newFormatedBitmapSource.BeginInit(); newFormatedBitmapSource.Source = myBitmapSource; newFormatedBitmapSource.DestinationFormat = PixelFormats.Cmyk32; newFormatedBitmapSource.EndInit();~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

我做了一些研究,有些人建议检查 WindowsCodecs.dll 版本。我这样做并在我的开发机器中发现版本是 6.1.7600 而服务器版本是 6.0.5840。我尝试将较新版本复制到服务器并通过 regsvr32 注册,但我收到“找不到入口点 dllregisterserver”。我尝试搜索 windowsCodecs 6.1 安装程序但找不到。

如何更新服务器中的 WindowsCodecs.dll?我是否正朝着这个问题的正确解决方案前进?任何输入将不胜感激。

谢谢

最佳答案

另一个可能的解决方案是:

如果您的客户端运行的是 Windows XP,并且您正在使用 WPF 窗口中的图标。 Windows 标题栏中会显示一个图标。删除该图标和程序窗口中的所有图标,它可能解决错误。

不止一次在这个问题上花费了数小时,它总是与窗口中的图标有关。注意:其他图像可以在程序中使用,但窗口标题中的 .ico 无效。

关于c# - FormatConvertedBitmap - 找不到适合完成此操作的成像组件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4798056/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com