Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
which image types work with "image.LoadFromFile()"
Print
Pages: [
1
]
Author
Topic: which image types work with "image.LoadFromFile()" (Read 2628 times)
0 Members and 1 Guest are viewing this topic.
blueeyedlion
Jr. Member
Posts: 61
which image types work with "image.LoadFromFile()"
«
on:
June 21, 2011, 12:29:32 am »
I'm having trouble getting sprites to work, and I suspect it has something to do with trying to load a ".png" file. What image files are supported?
Logged
Disch
Full Member
Posts: 220
which image types work with "image.LoadFromFile()"
«
Reply #1 on:
June 21, 2011, 12:38:10 am »
Why do you suspect that? Is LoadFromFile failing? (it will return false if it fails)
8 bit pngs are supported
Logged
blueeyedlion
Jr. Member
Posts: 61
which image types work with "image.LoadFromFile()"
«
Reply #2 on:
June 21, 2011, 04:31:20 am »
the console is saying that the file failed to open
Logged
OniLinkPlus
Hero Member
Posts: 500
which image types work with "image.LoadFromFile()"
«
Reply #3 on:
June 21, 2011, 04:53:43 am »
PNGs are supported and always have been supported. What is the exact error that is being given? Does the file you are trying to load exist?
Logged
I use the latest build of SFML2
blueeyedlion
Jr. Member
Posts: 61
which image types work with "image.LoadFromFile()"
«
Reply #4 on:
June 21, 2011, 05:21:27 am »
Yes it exists. It is in the same folder as the .exe is to be put. Is that the right place?
The exact error is: failed to load image "black_piece.png". Reason : Unable to open file
Logged
Walker
Full Member
Posts: 181
which image types work with "image.LoadFromFile()"
«
Reply #5 on:
June 21, 2011, 07:35:13 am »
The program can't find the file. Your IDE probably does not have its working directory set to the right place. Either change the working directory or move your assets to the current one (probably where the project file is).
Logged
blueeyedlion
Jr. Member
Posts: 61
which image types work with "image.LoadFromFile()"
«
Reply #6 on:
June 21, 2011, 08:56:23 pm »
Moving it to where the project file is worked. Thank you.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
which image types work with "image.LoadFromFile()"
anything