I am trying to save texture to a image using SOIL2 library.
int _width, _height;
unsigned char* _image = SOIL_load_image("C:\\Temp\\RED.png", &_width, &_height, 0, SOIL_LOAD_RGB);
int save_result = SOIL_save_image
(
"C:\\temp\\atlas.png",
SOIL_SAVE_TYPE_PNG,
_width, _height, GL_RGB,
_image
);
But image does not gets saved the return values from the saved function is 0.