Jump to content

  • Log In with Google      Sign In   
  • Create Account


SDL_image code suddenly stopped working.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Spirrwell   Members   -  Reputation: 258

Like
0Likes
Like

Posted 20 July 2012 - 10:29 AM

I don't understand what's going on, I have these same two images that have been in a minor little test project I have that were loaded and rendered to the screen. It worked when I last used it. Now today, probably a week or so later, I try to recompile it, it doesn't work. Same code, but I get an error that it's an unsupported image format. That's impossible. I used these images before, and they're simple jpg files.

This is how I loaded each image:

SDL_Surface* img = IMG_Load(file);

"file" is just part of a this function: GLuint LoadTexture(const char* file)

Well, I'm at a loss, I didn't change the code since last use, and it worked fine then. Just so you know, I'm running Linux Mint as my OS with Code::Blocks as my IDE.

Sponsor:

#2 mrjones   Members   -  Reputation: 612

Like
0Likes
Like

Posted 20 July 2012 - 10:41 AM

Ideas that first pop into mind are:
1. Did you somehow manage to install another version of SDL library on your system that gets linking priority?
2. Did you either change project settings or project failed to save properly last time you changed it?
3. Did you update Code::Blocks or gcc?

In other words, what might have been something else related, but not immediately obvious that you or something automated on your system might have done? Just to be safe, I'd try to open the JPG files with something else as it is the easiest thing to check and maybe they have become corrupt somehow.

#3 Spirrwell   Members   -  Reputation: 258

Like
0Likes
Like

Posted 20 July 2012 - 10:47 AM

I don't recall installing another version of the SDL library, but I'll look into that, and I didn't alter the project settings, just the build options to link needed libraries. I also didn't update Code::Blocks or GCC.

Edit: Oh yeah, I have opened the JPG files. They appear to be perfectly normal.

Edited by Spirrwell, 20 July 2012 - 10:48 AM.


#4 mrjones   Members   -  Reputation: 612

Like
0Likes
Like

Posted 20 July 2012 - 10:56 AM

I am not entirely certain about how things work on *nix systems, but zlib or libjpg might also be somehow related to the problem.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS