C 语言中最好质量的抖动库
我正在开发一个与 OpenGL 一起使用的纹理图集打包程序,目前我正在寻找一个开源(如果它是一个库更好,但开源软件也很好!)的解决方案,该解决方案将渲染调色板创建/抖动的最佳结果。它确实不需要很快,但需要达到最佳结果。如果能够生成每像素 4 位调色板,那就最好了。
I'm developing a texture atlas packer to use with OpenGL, and I'm currently looking for an open-source (it's better if it's a library, but an open-source software would be good as well!) solution that will render the best results for color palette creation / dithering. It really doesn't need to be fast, but needs to achieve optimal results. It would be best if there is a possibility for 4-bit-per-pixel palette generation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
pngquant 可作为纯 C 库。
ImageMagick 使用八叉树,速度很快,但质量不是最好的。
pngquant 使用 MedianCut 并进行了一些额外的改进,并且可能会提供更高的质量。
pngquant 具有速度/质量权衡设置,可以进一步提高质量,并且还具有自定义抖动算法(Floyd-Steinberg 的变体),不会向图像的量化良好区域添加噪声。
pngquant is available as a pure C library.
ImageMagick uses octtree, which is fast, but not the best quality.
pngquant uses MedianCut with several additional improvements, and is likely to give higher quality.
pngquant has speed/quality trade-off setting which can improve quality a bit further, and also has custom dithering algorithm (variation of Floyd-Steinberg) that doesn't add noise to well-quantized areas of the image.
Imagemagick 是一个非常强大用于图形操作的 C 库:http://www.imagemagick.org/ 它有命令行工具,但也可以用作 C 库。
Imagemagick is a very powerful C library for graphical manipulation: http://www.imagemagick.org/ It has commandline tools, but can also be used as a C library.
为了将来的参考,我找到了 PNGNQ,这是一个非常好的图像量化库。他们的样品很棒。
For future reference, I found PNGNQ, which is a pretty good library for image quantization. Their samples are amazing.