C#中无损图像压缩的最佳格式 [英] Best format for lossless image compression in C#

查看:464
本文介绍了C#中无损图像压缩的最佳格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要单独保存视频帧并无损压缩它们.我正在寻找c#中最好的方法和格式-最好是指实现简单,良好的压缩和合理的处理要求之间的最佳平衡.

I need to save video frames individually and compress them losslessly. I'm looking for the best method and format in c# - by best I mean the best balance of simplicity of implementation, good compression and reasonable processing requirements.

我知道PNG是无损的,但是它的压缩对于照片风格的图像来说并不是很好.

I know PNG is lossless, but its compression isn't great for photo style images.

我知道有一种无损的Jpeg格式,但这是用C#实现的吗?

I understand that there is a lossless Jpeg format, but is this implemented in C#?

还有其他我不知道的选择吗?

Are there other options I am unaware of?

推荐答案

以下是针对不同类型的无损编码的一些压缩率(来源,越高越好):

Here are some compression ratio's for different kinds of lossless encoding (source, higher is better):

        JPEG 2000R  JPEG-LS L-JPEG  PNG 
bike    1.77        1.84    1.61    1.66
cafe    1.49        1.57    1.36    1.44
cmpnd1  3.77        6.44    3.23    6.02
chart   2.60        2.82    2.00    2.41
aerial2 1.47        1.51    1.43    1.48
target  3.76        3.66    2.59    8.70
us      2.63        3.04    2.41    2.94
average 2.50        2.98    2.09    3.52

如您所见,无损JPEG的压缩效果并不比PNG好得多,而且由于PNG受到更好的支持,所以我建议您只使用PNG.

As you can see, lossless JPEG does not compress significantly better than PNG, and as PNG is supported much better I would recommend you to just use PNG.

这篇关于C#中无损图像压缩的最佳格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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