位图转换为的WebP图像? [英] Convert Bitmap to WebP Image?
本文介绍了位图转换为的WebP图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都知道,如果有可能一个位图
转换为使用C#中的的WebP
形象?
Anyone know if it's possible to convert a Bitmap
to a WebP
image using C#?
被谷歌-ING左右,但无法找到C#什么。我找到了这个:
MC琦/ libwebp锐·GitHub的但它似乎没有位图转换为在的WebP
格式。
Been Google-ing around but wasn't able to find anything for C#. I found this:
mc-kay/libwebp-sharp · GitHub but it doesn't seem to convert bitmaps to the WebP
format.
任何想法?
推荐答案
加载的WebP图片
using (Bitmap image = WebPFormat.LoadFromStream(new FileStream("image.webp", FileMode.Open, FileAccess.Read)))
{
image.Save("image.png", ImageFormat.Png);
}
保存的WebP图片
Save a WebP image
using (Image image = Image.FromFile("image.jpg"))
{
Bitmap bitmap = new Bitmap(image);
WebPFormat.SaveToFile("image.webp", bitmap);
}
有关更多信息看看这里的的 WEBP 的
For more info take a look here webp
这篇关于位图转换为的WebP图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文