title: How to save texture to image using soil2 library
body: <p>I am trying to save texture to a image using SOIL2 library.</p>
  <pre><code>            int _width, _height;
  
              unsigned char* _image = SOIL_load_image(&quot;C:\\Temp\\RED.png&quot;, &amp;_width, &amp;_height, 0, SOIL_LOAD_RGB);
  
              int save_result = SOIL_save_image
              (
                  &quot;C:\\temp\\atlas.png&quot;,
                  SOIL_SAVE_TYPE_PNG,
                  _width, _height, GL_RGB,
                  _image
              );
  </code></pre>
  <p>But image does not gets saved the return values from the saved function is 0.</p>