我正在尝试将画布的屏幕截图保存在png文件中,但这给了我以下错误。
Java版本:10 Javafx版本:11
示例代码:
/**
Loads an image from disk into an array of unsigned chars.
Note that *channels return the original channel count of the
image. If force_channels was other than SOIL_LOAD_AUTO,
the resulting image has force_channels, but *channels may be
different (if the original image had a different channel
count).
\return 0 if failed, otherwise returns 1
**/
unsigned char*
SOIL_load_image
(
const char *filename,
int *width, int *height, int *channels,
int force_channels
);
但是发生以下异常。
stb_image.h
有人可以帮助我吗?