You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
int imgFlags = IMG_INIT_PNG;
if( !( IMG_Init( imgFlags ) ) )
{
printf( "SDL_image could not initialize! SDL_image Error: %s\n", IMG_GetError() );
return false;
}
This will always print the following message to the console
SDL_image could not initialize! SDL_image Error: PNG images are not supported
Interestingly, simply not calling IMG_Init makes everything work in Emscripten.
Even more interestingly, whether one calls IMG_Init or not has no effect at all in NATIVE sdl2.
I don't know what to make of it.
But at the very least, the Emscripten port should spit something like "You don't need to call IMG_Init" rather than just throw a confusing unrelated error.
The text was updated successfully, but these errors were encountered:
I'm not sure at this point how we are building SDL image. I guess we aren't linking in libpng, and instead rely on browser decoding, which is asynchronous. I assume that's the reason for this confusion, but I'm not sure.
PNG's are not the specific cause. Swap the flag with int imgFlags = IMG_INIT_WEBP and you'd get the same error, WEBP images are not supported, this is true for any flag.
This will always print the following message to the console
Interestingly, simply not calling IMG_Init makes everything work in Emscripten.
Even more interestingly, whether one calls IMG_Init or not has no effect at all in NATIVE sdl2.
I don't know what to make of it.
But at the very least, the Emscripten port should spit something like "You don't need to call IMG_Init" rather than just throw a confusing unrelated error.
The text was updated successfully, but these errors were encountered: