gimp导出的C源代码如何生成图像?

新手上路,请多包涵

通过gimp导出的C源代码:

/* GIMP RGB C-Source image dump (无标题.c) */

static const struct {
    unsigned int    width;
    unsigned int    height;
    unsigned int    bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */
    unsigned char    pixel_data[10 * 10 * 2 + 1];
} gimp_image = {
    10,                                        10, 2,
    "\222\224q\214q\214Q\214Q\214Q\214Q\214Q\214Q\214Q\214Q\214Q\214\060\204\020"
    "\204\020\204\020\204\020\204\020\204\020\204\020\204Q\214\060\204\060\204\020\204"
    "\020\204\357{\357{\357{\357{\357{Q\214\060\204\060\204\020\204\020\204\357{\357"
    "{\357{\357{\357{\222\224q\214Q\214Q\214Q\214\060\204\060\204\060\204\020\204"
    "\020\204\262\224\262\224\262\224\222\224\222\224\222\224\222\224q\214q\214"
    "q\214\024\245\024\245\024\245\363\234\363\234\363\234\363\234\323\234\323\234"
    "\323\234\266\265\226\265\226\265u\255\226\265u\255u\255u\255u\255u\255\070"
    "\306\070\306\030\306\030\306\030\306\030\306\030\306\030\306\030\306\030\306\272\326"
    "\272\326\272\326\272\326\272\326\272\326\272\326\272\326\272\326\272\326",
};

如何使用C生成图像?

阅读 4.5k
1 个回答

http://www.keil.com/forum/237...

void GLCD_Bitmap (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char
*bitmap)
GLCD_Bitmap(0, 0, gimp_image.width, gimp_image.height, (unsigned char *)&gimp_image.pixel_data);
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进