Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: failed to load image"sprite1.png": png not supported 8 bit only  (Read 2387 times)

0 Members and 1 Guest are viewing this topic.

doomlead

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
failed to load image"sprite1.png": png not supported 8 bit only
« 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.

BlurrOfDeath

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: failed to load image"sprite1.png": png not supported 8 bit only
« Reply #1 on: November 30, 2014, 10:01:22 am »
You have an extra closing bracket at the end, that might be the problem.

doomlead

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: failed to load image"sprite1.png": png not supported 8 bit only
« Reply #2 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
« Last Edit: November 30, 2014, 10:13:52 am by doomlead »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: failed to load image"sprite1.png": png not supported 8 bit only
« Reply #3 on: November 30, 2014, 11:16:51 am »
I think the error message is pretty clear... 8-bit PNG images are not supported :P
Laurent Gomila - SFML developer

 

anything