SFML community forums
Help => Graphics => Topic started by: TheEnigmist on May 12, 2011, 11:53:22 pm
-
I'm looking for comand to take a screenshot with SFML 2.0
The App.Capture of 1.6 doesn't work in 2.0 and i didn't find the good comand to do it.
I need to make a menĂ¹ with last frame of the game under it.
So i want to do this
Take screen-> take it in memory -> use the comande Image.LoadFromMemory -> show it under menu interface.
Can i do it? :)
-
sf::Image::CopyScreen() (http://www.sfml-dev.org/documentation/2.0/classsf_1_1Image.php#a35d840e67a4303e92e1449c94833faf6)
-
Thanks man ;)
-
A question... i want to save my screenshot by numbers
Ex: screen001,screen002 etc.
I made this code but i don't know how to put into SaveToFile()_
char screen[50];
int numScreen=4;
sprintf (screen, "%03d", numScreen);
So if i do cout << screen; i get 004 etc.
Can you help me? :)
-
If you're programming c++, you should use c++ ;).
I recommend std::stringstream to you. It should look like this:
std::stringstream filename;
filename << "screenshots/screenshot_" << screenshot_num_ << ".png";
Image.SaveToFile( filename.str() );
-
If you're programming c++, you should use c++ ;).
I recommend std::stringstream to you. It should look like this:
std::stringstream filename;
filename << "screenshots/screenshot_" << screenshot_num_ << ".png";
Image.SaveToFile( filename.str() );
You... you are a f*cking genius LOL
Thx a lot :)
Now i've to lern how to avoid FPS Overlay benn captured by game :)
-
There's probably a better way to do it, but the first thing that comes to mind is ...
If screenshot button pressed
takeScreenshot = true
//Drawing stuff
if !takeScreenshot
draw FPS
blah blah
if takeScreenshot
take screenshot
I am rather tired so sorry if this is impossible/stupid/doesn't work :)
-
There's probably a better way to do it, but the first thing that comes to mind is ...
If screenshot button pressed
takeScreenshot = true
//Drawing stuff
if !takeScreenshot
draw FPS
blah blah
if takeScreenshot
take screenshot
I am rather tired so sorry if this is impossible/stupid/doesn't work :)
The problem is that FPS shown on screen is not from game... is from a third-party program (Fraps/Play Claw etc). I don't know why it capture this overlay too, but i can't find a solution to isolate it
-
It is called "screenshot". Hence it captures what's on the screen. And the overly is on the screen, hence it is captured ;).
The easiest way would probably be not to use these FPS-applications, if you want to create a screenshot.
-
It is called "screenshot". Hence it captures what's on the screen. And the overly is on the screen, hence it is captured ;).
The easiest way would probably be not to use these FPS-applications, if you want to create a screenshot.
Uhm but there are some games that doesn't capture FPS :(
(I've just take some screenshots in Portal 2)
-
They probably write some windows specific code to omit that. Not something you can do purely trough SFML. I recommend instead that you have your own FPS overlay built into the application. And any other debug information you might need.
-
They probably write some windows specific code to omit that. Not something you can do purely trough SFML. I recommend instead that you have your own FPS overlay built into the application. And any other debug information you might need.
Ah ok :(
Thanks for infos!