Search code examples
pngtexturessfml

SFML: unable to open .png file


It may sound like other questions related to this matter but I don't have any problems opening rectangular .png files. Seems like my computer has problems only with non-rectangular pictures (e.g. triangular play button without the background). What can be done? I think there's no need to provide a reproducible example. Appreciate all the help.

EDIT: the error is as follows


Solution

  • I think you forgot to put your picture in your project folder because I once made that mistake for a game that I made. You should also maybe remove Resources/res/ from the loadFromFile code.