WPF图像编码比较 [英] WPF image encoding comparisson

查看:88
本文介绍了WPF图像编码比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题.我今天有点懒,不想在WPF中提供一些图像编码功能的比较.
也许有人可以建议我在WPF中应该看哪种图像编码类.
问题包括下一个:
我需要提供跨网络传输的图像数据.哪个编码类更方便并且更适合呢?
我看着

I have one question. I''m a bit lazy today and do not want to provide some comparison of Image encoding capabilities in WPF.
Maybe someone can advice me at which image encoding class i should be looked at in WPF.
The problem consist of next:
i need to provide a image data trasfer across network. Which of encoding classes is more convenient and more suitable for this?
I looked at

PngBitmapEncoder

JpegBitmapEncoder



您能给我什么建议?



What can you advice to me?

推荐答案

这取决于您的情况.但是,似乎最好的选择是使用JpgBitmapEncoder,因为您正在对图像进行编码并通过网络进行传输.我看不到使用PngBitmapEncoder在质量或尺寸上会有什么改善.

这是一篇有关PNG和JPG之间差异的好文章,应该可以帮助您做出决定: http://www.turnkeylinux .org/blog/png-vs-jpg [ ^ ]
It depends on your situation. However, it seems like your best bet would be to use the JpgBitmapEncoder since you are encoding the image and transferring it across the network. I don''t see where you will see an improvement in quality or size by using the PngBitmapEncoder.

Here is a good article on the differences between PNG and JPG that should help in your decision: http://www.turnkeylinux.org/blog/png-vs-jpg[^]


这篇关于WPF图像编码比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆