ResourceCreate Creates an image resource based on a data set. There are two variants of the function:
Creating a resource based on a file bool ResourceCreate(
const string resource_name, // Resource name
const string path // A relative path to the file
); |
Creating a resource based on the array of pixels bool ResourceCreate(
const string resource_name, // Resource name
const uint& data[], // Data set as an array
uint img_width, // The width of the image resource
uint img_height, // The height of the image resource
uint data_xoffset, // The horizontal rightward offset of the upper left corner of the image
uint data_yoffset, // The vertical downward offset of the upper left corner of the image
uint data_width, // The total width of the image based on the data set
ENUM_COLOR_FORMAT color_format // Color processing method
); |
大家都知道这两个函数,不知大家伙在用的时候是否遇到了一些问题呢?
我这里就跟大家说一下我用的过程中的具体实用问题,可能我的调用不合规范:
用第一种形式调用时,无论怎么修改,就是创建不了,所以第二种压根不能用。总是提示文件名称错误。
至于正确的形式应该怎么写呢?我们一起来讨论一下吧,
|