如何将JPG图像加载到内存中? [英] How to load a JPG image into memory?
本文介绍了如何将JPG图像加载到内存中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
实际上,我想将图像转换为像素,然后严格在C ++中将指针指向第一个像素.请尽快回答.谢谢.
Actually I want to convert an image to pixels and then point a pointer to the first pixel strictly in C++. Please answer this ASAP. Thank you.
推荐答案
^ ]
包括标题atlimage.h
(您的项目必须使用 ATL 或 MFC )并使用类CImage
:它提供了一种简便的方式来加载,保存,渲染和访问图像中各种格式的像素,如 bmp , jpeg , png 等.
在这里,您可以找到有关该类的文档: CImage类(ATL/MFC) [^ ]
Include the headeratlimage.h
(your project must use ATL or MFC) and use the classCImage
: it provide an easy way to load, save, render and access pixels on images from/to various formats, like bmp, jpeg, png, etc.
Here you can find the documentation about the class: CImage Class(ATL/MFC)[^]
另一个选项(因为CImage
是GDI+
包装器)直接使用GDI+
.
:)
Another option (asCImage
is aGDI+
wrapper) is using directlyGDI+
.
:)
这篇关于如何将JPG图像加载到内存中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文