读书人

以上结构体中,unsigned char怎么保存为

发布时间: 2012-09-23 10:28:10 作者: rapoo

以下结构体中,unsigned char如何保存为图片

C/C++ code
typedef unsigned char     ABS_BYTE;typedef struct abs_image {  ABS_DWORD Width;     ///< Width of the image in pixels.  ABS_DWORD Height;     ///< Height of the image in pixels.  ABS_DWORD ColorCount;     ///< Maximal color count of the image.  ABS_DWORD HorizontalDPI;     ///< Horizontal resolution of the image (dots per inch).  ABS_DWORD VerticalDPI;     ///< Vertical resolution of the image (dots per inch).  ABS_BYTE ImageData[ABS_VARLEN];     ///< Color values of all pixels.} ABS_IMAGE;typedef ABS_IMAGE ABS_SAMPLE_IMAGE; static ABS_SAMPLE_IMAGE* pImage = NULL;


[解决办法]
你循环RGB,然后给像素颜色就OK了。

读书人网 >C语言

热点推荐