如何序列化CBitmap [英] How to serialize a CBitmap
本文介绍了如何序列化CBitmap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个位图,其中包含一些其他信息,我想将所有信息保存在文件中.我怎样才能做到这一点?
谢谢
I have a bitmap with some other information and I want to save all in a file. How can I do that?
Thanks
推荐答案
如果您不想使用自己的格式编写位图,请查看在atlimage.h
中声明的CImage
类(请参阅 http://msdn.microsoft.com/en-us/library/bwea7by5( VS.80).aspx [
If you don''t want to write the bitmap using your own format, get a look to theCImage
class, declared inatlimage.h
(see http://msdn.microsoft.com/en-us/library/bwea7by5(VS.80).aspx[^]).
Otherwise you can save the image size (rows and columns) followed by the RGB values of each pixel.
这篇关于如何序列化CBitmap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文