![]() |
SDL_Image won't load my PNG | ![]() |
![]() |
![]() |
He4TS3eKeR
![]() |
![]() |
Tried making a new 8bit PNG with the same name and resolution in photoshop cs6. Doesn't work
![]() |
||||||||||
|
![]() |
![]() |
pmacfarlane
![]() |
![]() |
Well, I don't know which tutorials you're talking about... can you elaborate? (Provide a link?)
Not sure how it works on Windows, but on Linux, you'll need to install libpng for SDL_image to be able to read .png files. Maybe this is true on Windows too. Try making a .bmp file instead, and loading that. SDL_image can load those with no extra library support required. |
||||||||||
|
![]() |
![]() |
He4TS3eKeR
![]() |
![]() |
Eh, maybe i didnt make myself clear enough. Sorry i forgot this isnt Lazyfoo's forum, but the general SDL one.
http://lazyfoo.net/SDL_tutorials/lesson04/index.php It's not just this lesson btw, none of my lessons can debug because of this problem. All the code is correct, the only problem is that IMG_load can't open x.png, and ive got everything laid out correctly already, like said. Also like i said the logger returns "Couldn't open x.png". All the code is there and I'm using the SDL_image.lib in the linker and i have all the .dll's in my core folder as well. I really don't know what else to try. |
||||||||||
|
![]() |
![]() |
He4TS3eKeR
![]() |
![]() |
bump
|
||||||||||
|
![]() |
![]() |
He4TS3eKeR
![]() |
![]() |
Okay, I'm sorry but for anyone who encounters a problem like this, you don't have to put the image next to the .exe. I put the image in the folder it took me to when i right clicked my project in visual studio and clicked "Open windows explorer", which was in this format Projects/ProjectName/ProjectName. I have no idea why this is the case and if anyone can help me configure my Visual c++ to point to my Debug folder where the .exe is i would appreciate it, otherwise ill keep using this folder since the problem is solved.
|
||||||||||
|