943,694 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 2232
  • C++ RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Nov 7th, 2008
1

Re: New to SDL

Well, by doing the following ...

C++ Syntax (Toggle Plain Text)
  1. ...
  2. background = load_image("background.bmp");
  3.  
  4. if(background == NULL)
  5. {
  6. // load_image() failed ...
  7. cout << "load_image() failed, error: " << SDL_GetError() << endl;
  8. }
  9.  
  10. apply_surface(100, 100, message, screen);
  11. ...

I got output as follows:

load_image() failed, error: File is not a Windows BMP file
Reputation Points: 1105
Solved Threads: 389
Posting Virtuoso
mitrmkar is offline Offline
1,714 posts
since Nov 2007
Nov 7th, 2008
1

Re: New to SDL

Is it an image you changed manually from .jpg (for example) to bmp by just renaming the file?
Reputation Points: 13
Solved Threads: 8
Junior Poster in Training
minas1 is offline Offline
81 posts
since Nov 2008
Nov 7th, 2008
0

Re: New to SDL

Ah, GIMP didn't support BMP, but I saved it anyway... I'm going to make a new background.
Thanks for the solution!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Xarver is offline Offline
10 posts
since Oct 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: member data of a class
Next Thread in C++ Forum Timeline: Tough time solving this problem. Month names to store in array and manual entry?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC