Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# C“WebP图像抛出错误”;试图加载格式不正确的程序。”;_C#_Webp - Fatal编程技术网

C# C“WebP图像抛出错误”;试图加载格式不正确的程序。”;

C# C“WebP图像抛出错误”;试图加载格式不正确的程序。”;,c#,webp,C#,Webp,我正在尝试将jpeg图像转换为webp格式。在控制台应用程序中如下所示 using (Image image = Image.FromFile("Capture.jpg")) { Bitmap bitmap = new Bitmap(image); WebPFormat.SaveToFile("image.webp", bitmap); } 这里的参考 下面是错误的详细信息 错误:在中发生类型为“

我正在尝试将jpeg图像转换为webp格式。在控制台应用程序中如下所示

    using (Image image = Image.FromFile("Capture.jpg"))
    {
        Bitmap bitmap = new Bitmap(image);
        WebPFormat.SaveToFile("image.webp", bitmap);
    }
这里的参考

下面是错误的详细信息

错误:在中发生类型为“System.BadImageFormatException”的未处理异常 Noesis.Drawing.Imaging.WebP.dll 其他信息:试图加载格式不正确的程序

错误消息:试图加载带有不正确错误消息的程序 格式。(HRESULT的异常:0x8007000B)

StatckTrace:位于Noesis.Drawing.Imaging.WebP.NoesisWebP.Save(IntPtr&oWebPFileImage, Int32&oWebPFileImageSize、IntPtr-iBitmap、Int32-iWidth、Int32 iHeight,Int32 iQuality)在 Noesis.Drawing.Imaging.WebP.WebPFormat.Save(Int32液体,位图 iImage)在Noesis.Drawing.Imaging.WebP.WebPFormat.SaveToFile(字符串 iFilename、Int32 iQuality、位图iImage)位于 中的WebP.Program.Main(字符串[]args) c:-----\Program.cs:at的第17行 System.AppDomain.\u下一个安全程序集(运行时程序集,字符串[]) args)位于System.AppDomain.ExecuteAssembly(字符串汇编文件, 证据汇编安全性,字符串[]args)位于 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
位于System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext、ContextCallback回调、对象状态、布尔值 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext、ContextCallback回调、对象状态、布尔值 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext、ContextCallback回调、对象状态)位于 System.Threading.ThreadHelper.ThreadStart()


Noesis的
WebP
不再维护,上一个版本是7年前的beta版。考虑使用另一个框架来进行转换。复制的32位和64位的组合可能不再保存Noesis的<>代码> WebP <代码>,而最后一次发布是7年前的beta版本。考虑使用另一个框架来进行转换。复制的32位和64位的组合可能是复制的。