Sign in to follow this  

[SDL]SDL_SaveBMP giving me blank image output file?

This topic is 2041 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

Just found out about this nifty little function in SDL, letting you capture your screen, however, experimenting with it showed me that every time I try to use it on my main screen SDL_Surface, I always get the output file as a blank image at the size of the screen.
The function returns a 0, so it was successful in its' own eyes.

A Google search about it gave me nothing to work with =\

I'm not using OpenGL.

Any information about this would be much appreciated.
Thanks!

Share this post


Link to post
Share on other sites
Meh, figured it out...
I was making the call to SaveBMP from a point in the code before the screen surface was populated..
Created a flag trigger for it to be called after the flip, and now it works fine.

Share this post


Link to post
Share on other sites

This topic is 2041 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this