Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#10 invalid extension - jpg, png files reading issue

1.0
open
nobody
None
2014-03-17
2014-03-04
filipwasil
No

Hello,

there is an issue when opening .jpg or .png files:

ilInit();
iluInit();
ilutInit();
ilutRenderer(ILUT_OPENGL);

ilLoadImage( (ILconst_string) "/home/filip/Projects/ClientCpp/src/data/m.png" );

ILenum result = ilGetError();

if (result != IL_NO_ERROR)
{
cout << "ERROR: " << iluErrorString(result) << endl;
exit(EXIT_FAILURE);
}

What i get is:

ERROR: invalid extension

when i put the file in the same directory with executable - there is no change.

...
ilLoadImage( (ILconst_string) "m.png" );
ilLoadImage( "m.png" );
...

I have also tried with .jpg files - the same.

When trying to use ilLoad() there is an "invalid enumerant" error.

ilLoad( IL_JPG, (ILconst_string) "a.jpg" );

ILenum result = ilGetError();

if (result != IL_NO_ERROR)
{
cout << "ERROR: " << iluErrorString(result) << endl;
exit(EXIT_FAILURE);
}

ERROR: invalid enumerant

Please help.

Filip

Discussion

  • filipwasil
    filipwasil
    2014-03-05

    I guess that problem is about .jpg and .png formats.
    These files can not be read or saved under linux.
    I have to convert all images to .tga format.

     
  • Skyfaller
    Skyfaller
    2014-03-17

    I works for me under Windows. You may need to rebuild ResIL with support for these file types.