管理PNG优化图书馆可用? [英] Managed PNG Optimization Library Available?

查看:124
本文介绍了管理PNG优化图书馆可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待建立PNG优化(各种各样的PNGsqeezer / squisher)到我的构建(TFS 2010构建工作流)。我想创建一个新的建设活动,并与我的所有活动,我更喜欢有我所有的代码很少设法没有依赖关系。

I am looking to build in PNG optimization (a PNG "sqeezer/squisher" of sorts) into my builds (TFS 2010 Build Workflow). I want to create a new build activity and as with all my activities, I prefer to have all my code managed with little to no dependencies.

我已经搜索(谷歌搜索)并发现PNG optimiaztion许多不同的PNG库。 PNGOUT,PNGCRUSH,使用OptiPNG等,他们都不是真正的.NET。他们都看起来像伟大的工具。我比较喜欢的不可以从我的代码活动调用EXE文件(独立进程),因为你永远不知道会发生什么(不可靠)。

I have searched (Googled) and found many different PNG libraries for PNG optimiaztion. PNGOUT, PNGCRUSH, OptiPNG, etc. None of them are really .NET. They all seem like great tools. I prefer not to call EXE files (separate processes) from my code activity because you never really know what will happen (less reliable).

所以,我想也许PNGGauntlet将是一种选择。但在安装的应用程序,它仅仅是一个C#GUI调用二进制pngout.exe快速寻找。 。这正是我不想做

So i thought maybe PNGGauntlet would be an option. But looking quickly at the installed application, its merely an C# GUI that calls the binary pngout.exe. That is exactly what I don't want to do.

所以我的问题是这样的:是否有一个开源和/或免费.NET库,做PNG压缩(DLL)?

So my question is this : Is there an open-source and/or free .NET library (DLL) that does PNG compression?

推荐答案

我刚刚发现了这个: nQuant 。从项目页面:

I've just found this one: nQuant. From the project page:

nQuant是一个.NET的颜色量化产生高品质的256色
8位PNG图像。 nQuant常常降低了32位的图像的大小,以一个
尺寸小于其原始质量超过什么
中的标准C命令行实用程序产生的3倍。

nQuant is a .net color quantizer that produces high quality 256 color 8 bit PNG images. nQuant often reduces the size of a 32 bit image to a size 3 times smaller than its original with quality surpassing what the standard C command line utilities produce.

我曾与一些样本测试的PNG出来,它确实产生了良好的8位输出,比.NET自己的8位编码器和无可见抖动更小,甚至平滑处理的图像。我想一件事,但是:处理可能有点慢,但不幸的是库没有优化代码的并行变体。我工作的一个解决方案。

I've tested it out with some sample PNGs and it really does produce a good 8-bit output, smaller than .NET's own 8-bit encoder and with no visible dithering, even for antialiased images. I miss one thing, however: the processing can be a bit slow, but the library unfortunately doesn't have a parallelized variant of the optimization code. I'm working on a solution for this.

更新(2013年1月21日),我已经重构代码,它运行10倍的速度,现在,即使没有并行线程。叉是在这里: http://nquant.codeplex.com/SourceControl/network/forks/breki74/nQuantFaster

UPDATE (Jan 21, 2013), I've refactored the code, it runs 10 times faster now, even without the parallel threads. The fork is here: http://nquant.codeplex.com/SourceControl/network/forks/breki74/nQuantFaster

更新(2013年2月24日),我的叉子被合并到主干。享受。

UPDATE (Feb 24, 2013), my fork was merged to the trunk. Enjoy.

这篇关于管理PNG优化图书馆可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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