We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
最初开发的有Boost的GIL由 Adobe 提供。它可能不是最直观的,但它肯定是最完整、最强大的库之一。
There is Boost's GIL which was originally developed by Adobe. It might not be the most intuitive one, but it certainly is one of the most complete and powerful libs.
如果您使用 OpenGL,那么 DevIL 是一个不错的选择,因为它的风格和约定比任何其他图书馆。它的设置相对容易,并且对多种格式有很好的支持。
关于懦弱的事情的一件事。虽然设置经过充分测试的可运行的第 3 方代码很好,并且可以节省您的时间,但也有一些关于学习图像加载的工作原理以及其工作原理的原因。如果你真的想擅长某件事,我相信你需要从头开始学习如何去做。即使您最终使用了第三方代码。
If you're using OpenGL, then DevIL is a good choice since its style and conventions adhere to OpenGL more than any other library. It's relatively easy to set up and also has great support for multiple formats.
One thing about the wuss thing. While it's nice to set up working 3rd party code that has been well tested and saves you time, there's something to be also said about learning how image loading works and why it works the way it does. If you really want to get good at something, I believe that you need to actually learn how to do it from scratch. Even if you end up using 3rd party code in the end.
您可以查看 SDL_Image,它是 简单的 DirectMedia 层。它作为加载几种不同图像格式的简单抽象。 SDL 是用 C 语言编写的,但很容易与 C 或 C++ 代码一起使用。
You could have a look at SDL_Image, a sub-project of the Simple DirectMedia Layer. It serves as an easy abstraction for loading several different image formats. SDL is written in C but is easy to use with either C or C++ code.
另一种可能性(主要是,如果不是专门用于 Windows)是
CXImage
。与许多其他格式相比,它的明显优势是支持多种相机原始格式(如果您对此很重要)。Yet another possibility (primarily, if not exclusively for Windows) is
CXImage
. Its obvious advantage over many others is supporting many camera raw formats, in case that matters to you.OpenImageIO 支持多种不同的文件格式,其中包括 TIFF、JPEG/JFIF、OpenEXR、PNG、HDR/RGBE、ICO、BMP 、Targa、JPEG-2000、RMan Zfile、FITS、DDS、Softimage PIC、PNM、DPX、Cineon、IFF、Field3D、Ptex、Photoshop PSD、Wavefront RLA、SGI、WebP 和 GIF
OpenImageIO supports many different file formats among them TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, ICO, BMP, Targa, JPEG-2000, RMan Zfile, FITS, DDS, Softimage PIC, PNM, DPX, Cineon, IFF, Field3D, Ptex, Photoshop PSD, Wavefront RLA, SGI, WebP, and GIF
我一直是 CImg 的粉丝。它非常容易使用。另一位用户喜欢答案:出色地。我将发布我在答案中发布的相同示例,以便您可以看到访问像素和尺寸信息是多么容易。
I'm always a fan of CImg. It's very easy to use. Another user liked the answer as well. I'll post the same example I posted in the answer so you can see how easy it is to access pixels and dimension info.
FreeImage 是一个很好的开源库
这是一个示例代码,可以通过“out.data()”访问数据
FreeImage is a good open source library
Here is an example code, data is accessible with "out.data()"