如何使用WIC从原始像素数据到PNG图像进行编码? [英] How to encode from raw pixel data to PNG image using WIC?

查看:179
本文介绍了如何使用WIC从原始像素数据到PNG图像进行编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对QT和WIC之间的编码器进行一些性能测试。 


将QImage编码为png文件非常容易。但我不知道如何使用WIC。



在我的QT程序中,我得到一个QImage,我可以获得每个像素数据我喜欢将此图像编码为PNG图像。  



请帮忙!提前谢谢你。




为生活着色

解决方案

您可以在
DirectXTex
库中找到执行许多WIC操作的源代码。


请注意,使用WIC的主要价值不是"性能"而是"安全性",因为WIC编解码器会进行大量的审查和文件模糊测试,并且会定期通过Windows Update进行维护。


I am doing a little performance test of encoders between QT and WIC. 

It is quite easy to encode QImage into png file. But I dont know how to do it using WIC.

In my QT program I get a QImage where I am able to get each pixel data and I like to encode this image into a PNG image.  

Please help! Thank you in advance.


color your life

解决方案

You can find source code to do many WIC operations in the DirectXTex library.

Note that the primary value in using WIC Is not 'performance' but 'security' as WIC codecs get a large amount of scrutiny and file-fuzz testing, and are serviced through Windows Update regularly.


这篇关于如何使用WIC从原始像素数据到PNG图像进行编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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