Creates an image resource based on a data set. There are two variants of the function:
Creating a resource based on a file
[in] Resource name.
[in] A one-dimensional or two-dimensional array for creating a complete image.
[in] The width of the rectangular image area in pixels to be placed in the resource in the form of an image. It cannot be greater than the data_width value.
[in] The height of the rectangular image area in pixels to be placed in the resource in the form of an image.
[in] The horizontal rightward offset of the rectangular area of the image.
[in] The vertical downward offset of the rectangular area of the image.
[in] Required only for one-dimensional arrays. It denotes the full width of the image from the data set. If data_width=0, it is assumed to be equal to img_width. For two-dimensional arrays the parameter is ignored and is assumed to be equal to the second dimension of the data array.
[in] Color processing method, from a value from the ENUM_COLOR_FORMAT enumeration.
Returns true if successful, otherwise false. To get information about the error call the GetLastError() function. The following errors may occur:
If the second version of the function is called for creating the same resource with different width, height and shift parameters, it does not create a new resource, but simply updates the existing one.
The first version of the function is used for uploading images and sounds from files, and the second version is used only for the dynamic creation of images.
Images must be in the BMP format with a color depth of 24 or 32 bits. Sounds can only be in the WAV format. The size of the resource should not exceed 16 Mb.
The component of the alpha channel is ignored
Color components are not handled by the terminal (must be correctly set by the user)
Color components are handled by the terminal