[英]How can I read/write an image in C++ using just boost/standard library?
Is this possible? 这可能吗? It doesn't matter what format the image is, but I have to be able to open it, read pixel data into some sort of array, create a new image using a modified set of pixel data. 图像的格式无关紧要,但我必须能够打开它,将像素数据读入某种数组,使用一组经过修改的像素数据创建新图像。
Thanks! 谢谢!
You need code to encode and decode the formats you want to support. 您需要使用代码对要支持的格式进行编码和解码。 You can do this yourself (not really ideal/practical,) you can embed encoding/decoding libraries (like libpng, for example,) or you can embed image libraries like DevIL. 你可以自己做(不是很理想/实用)你可以嵌入编码/解码库(例如libpng),或者你可以嵌入像DevIL这样的图像库。
Boost seems to include some sort of image access library known as Boost.GIL . Boost似乎包含某种称为Boost.GIL的图像访问库。 I really don't know much about it, though. 不过,我真的不太了解它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.