windows 使用 Win32/C++ 读取 PNG
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1391541/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Read a PNG Using Win32 / C++
提问by I. J. Kennedy
That there is no simpleway to read a PNG file into a memory bitmap in native Windows seemed impossible, but after much googling I'm beginning to believe it. The libpng/zlib combination is just too big. Any third-party libraries Win32 libraries out there for reading a PNG?
在本机 Windows 中没有简单的方法将 PNG 文件读入内存位图似乎是不可能的,但经过多次谷歌搜索后,我开始相信它。libpng/zlib 组合太大了。任何用于读取 PNG 的第三方库 Win32 库?
Edit: The boost::gil::png solution is much more complex than I'd hoped, too. Just need a single call that takes a file name and fills a memory buffer with pixels.
编辑: boost::gil::png 解决方案也比我希望的要复杂得多。只需要一次调用即可获取文件名并用像素填充内存缓冲区。