是否可以直接使用Qt内置的libpng库?
我将 QImage 保存到 PNG 文件,而 QPNGHandler 的可定制性不够(我需要 png_set_filter),所以我需要编写自己的 PNG 处理程序。如果 Qt 配置为没有 -system-libpng,我是否可以直接访问 Qt 的捆绑版本?
现在我正在静态编译 Qt,但这可能会改变。
I'm saving a QImage to a PNG file and QPNGHandler isn't customizable enough (I need png_set_filter) so I need to write my own PNG handler. If Qt was configured without -system-libpng, is it possible for me to directly access Qt's bundled version?
Right now I'm statically compiling Qt, but that could change.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,我想这应该是可能的。我看到符号位于 libQtGui.so 内:
我看到它包含来自 src/gui/image/qpnghandler.pri 的 libQtGui.so 内的所有源,除非在配置中指定了 system-png 。我想您必须手动获取 .pro 文件中指定的标头广告,因为我认为 Qt 在安装时不会导出这些标头。
Yes, I suppose it should be possible. I see the symbols are inside libQtGui.so:
I see it includes all the sources inside libQtGui.so from src/gui/image/qpnghandler.pri unless system-png is specified in configure. I guess you'll have to manually get the headers ad specify in your .pro file cause I don't think Qt is exporting those when installing.