Screen shot

Started by
6 comments, last by obj63 20 years, 9 months ago
I wasn''t sure which forum to put this in but I have made a game with SDL and C++ and I want to know how you would take a screen shot when it is running so I can post pictures of the game on my website.
Advertisement
Not the most flexible way to do it put you can just hit printscreen. Then open up an art package and paste it into your document.
There's a SDL_SaveBmp(...) function, or something like that. I used that in my game in order to make screenshots.

- Seby -
www.dfhi-bomber.fr.st

[edited by - theSeby on July 3, 2003 10:37:58 AM]
------------------------ - Seby -www.dfhi-bomber.fr.st
I couldn''t get the print screen to work, and I couldn''t find the SDL_SaveBMP in the sdl files, any chance you can find out what the command is Seby,

By the way, Nice site for your game Seby I am going to try your game now, looks pretty good.
quote:Original post by obj63
I couldn't get the print screen to work, and I couldn't find the SDL_SaveBMP in the sdl files, any chance you can find out what the command is Seby,

By the way, Nice site for your game Seby I am going to try your game now, looks pretty good.


http://sdldoc.csn.ul.ie/sdlsavebmp.php

He was right it is SDL_SaveBMP()
I haven't tried it but after seeing this post I might implement it into my project hehe





Please visit Turt99 Productions

[edited by - Turt99 on July 3, 2003 11:18:02 AM]
FOLLOW ME ON TWITTER OR MY BLOG
It is under the video stuff. Here it is:

SDL_SaveBMP
Name
SDL_SaveBMP -- Save an SDL_Surface as a Windows BMP file.
Synopsis

#include "SDL.h"
int SDL_SaveBMP(SDL_Surface *surface, const char *file);


Description
Saves the SDL_Surface surface as a Windows BMP file named file.

Return Value
Returns 0 if successful or -1 if there was an error



First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
quote:Original post by obj63
I couldn''t get the print screen to work.


Its ctrl & print screen, then you can just open up paint (if you have windows) and click edit then paste.

An ASCII tetris clone... | AsciiRis
thanks for the help all

This topic is closed to new replies.

Advertisement