WebP library for C# [closed]

2020-02-06 04:41发布

It seems like there is no code samples for WebP in C#. Is there any? I don't need to display WebP images directly but saving & transferring as WebP would be nice.

标签: c# jpeg webp
4条回答
姐就是有狂的资本
2楼-- · 2020-02-06 05:07

There is https://github.com/mc-kay/libwebp-sharp wrapper project. But it doesn't seem to be implemented.

查看更多
Deceive 欺骗
3楼-- · 2020-02-06 05:10

there is a project in github

Wrapper for libwebp in C#. The most complete wrapper in pure managed C#.

Exposes Simple Decoding API and Encoding API, Advanced Decoding and Encoding API (with stadistis of compresion), Get version library and WebPGetFeatures (info of any WebP file). Exposed get PSNR, SSIM or LSIM distortion metrics.

The wrapper is in safe managed code in one class. No need external dll except libwebp_x86.dll and libwebp_x64.dll (included v6.1). The wrapper work in 32, 64 bit or ANY (auto swith to the apropiate library).

The code is full comented and include simple example for using the wrapper.

see project page: https://github.com/JosePineiro/WebP-wrapper

查看更多
神经病院院长
4楼-- · 2020-02-06 05:22

Take a look at http://webp.codeplex.com/. There is a library that allows you to easily encode into WebP format. Check out this question for more information:

Convert Bitmap to WebP Image?

The library allows you to save into WebP format like so:

using (Image image = Image.FromFile("image.jpg"))
{
   Bitmap bitmap = new Bitmap(image);
   WebPFormat.SaveToFile("image.webp", bitmap);
}
查看更多
兄弟一词,经得起流年.
5楼-- · 2020-02-06 05:24

WebP-wrapper

Wrapper for libwebp in C#. The most complete wapper in pure managed C#. Exposes Simple Decoding API, Simple Encoding API, Advanced Encoding API (with stadistis of compresion), Get version library and WebPGetFeatures (info of any WebP file). In the future I´ll update for expose Advanced Decoding API. The wrapper is in safe managed code in one class. No need external dll except libwebp_x86.dll and libwebp_x64.dll (included v6.1). The wrapper work in 32, 64 bit or ANY (auto swith to the apropiate library).

The code is full comented and include simple example for using the wrapper.

查看更多
登录 后发表回答