Best format for lossless image compression in C#

偶尔善良 提交于 2019-12-20 03:14:45

问题


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.

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

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

Are there other options I am unaware of?


回答1:


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

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.



来源:https://stackoverflow.com/questions/12298515/best-format-for-lossless-image-compression-in-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!