从compilabe C源代码

时间:2015-10-08 20:42:16

标签: png embedded-resource gtk2

我转换了一个png - > c,用png2c。我可以用我的代码编译源代码而没有问题。我的问题是如何在我的gtk_image_new_from_pixbuf中访问该部分代码?有人有关于这个主题的故事吗?

/编辑:这是标题代码:

/*  GIMP header image file format (RGB): /icon.h  */

static unsigned int width = 255;
static unsigned int height = 255;

/*  Call this macro repeatedly.  After each use, the pixel data can be extracted  */

#define HEADER_PIXEL(data,pixel) {\
pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); \
pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \
pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \
data += 4; \
}
static char *header_data =
    "````````````````````````````````````````````````````````````````"
    "````````````````````````````````````````````````````````````````"
    "````````````````````````````````````````````````````````````````"
// more code

0 个答案:

没有答案