title: DevIL error 1290. How can I fix it?
body: <p>I would like to load image to my application, but I have an error:
  <a href="http://img510.imageshack.us/img510/5814/blad07864.png" rel="nofollow">http://img510.imageshack.us/img510/5814/blad07864.png</a></p>
  
  <p>This is a code of this application:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #undef _UNICODE
  #include "il.h"
  
  #pragma comment( lib, "DevIL.lib" )
  
  // Wow. DevIL is amazing.
  
  // From http://gpwiki.org/index.php/DevIL:Tutorials:Basics
  
  // The library consists of three sub-libraries:
  //  * IL - main DevIL library. It allows you to load and save images to files. Every function in this library have 'il' prefixed to their name.
  //  * ILU - this library contains functions for altering images. Every function in this library have 'ilu' prefixed to their name.
  //  * ILUT - this library connects DevIL with OpenGL. Every function in this library have 'ilut' prefixed to their name.
  
  int main()
  {
    ilInit();
    printf("DevIL has been initialized\n");
  
    // Loading an image
    ILboolean result = ilLoadImage( "tex1.png" ) ;
  
    if( result == true )
    {
      printf("the image loaded successfully\n");
    }
    else
    {
      printf("The image failed to load\n" ) ;
  
      ILenum err = ilGetError() ;
      printf( "the error %d\n", err );
      printf( "string is %s\n", ilGetString( err ) );
    }
  
    int size = ilGetInteger( IL_IMAGE_SIZE_OF_DATA ) ;
    printf("Data size:  %d\n", size );
    ILubyte * bytes = ilGetData() ;
  
    for( int i = 0 ; i &lt; size; i++ )
    {
      // see we should see the byte data of the image now.
      printf( "%d\n", bytes[ i ] );
    }
  }
  </code></pre>
  
  <p>I found code from this site: <a href="http://bobobobo.wordpress.com/2009/03/02/how-to-load-a-png-image-in-c/" rel="nofollow">http://bobobobo.wordpress.com/2009/03/02/how-to-load-a-png-image-in-c/</a></p>
  
  <p>Can you help me?</p>