SFML community forums

Help => Graphics => Topic started by: doomlead on November 30, 2014, 09:59:51 am

Title: failed to load image"sprite1.png": png not supported 8 bit only
Post by: doomlead on November 30, 2014, 09:59:51 am
I am using sfml 2.1, the compiler/IDE I am using is code blocks.
The subject is the error.
I recieved my code looks like this

sf::Texture texture;
texture.loadFromFile("sprite1.png"));

sprite1.png is a famtsu sprite sheet.
Title: Re: failed to load image"sprite1.png": png not supported 8 bit only
Post by: BlurrOfDeath on November 30, 2014, 10:01:22 am
You have an extra closing bracket at the end, that might be the problem.
Title: Re: failed to load image"sprite1.png": png not supported 8 bit only
Post by: doomlead on November 30, 2014, 10:10:36 am
You have an extra closing bracket at the end, that might be the problem.
that was a typo for the forum my code doesnt actually have the extra parenthesis code blocks wouldn't have let me compile with an extra parenthesis.
everything compiles just fine its when i run it the sfml  window is blank and the codeblocks console window gives me the failed to load message
Title: Re: failed to load image"sprite1.png": png not supported 8 bit only
Post by: Laurent on November 30, 2014, 11:16:51 am
I think the error message is pretty clear... 8-bit PNG images are not supported :P