List Info

Thread: Making a screenshot




Making a screenshot
country flaguser name
Indonesia
2007-04-10 21:50:39
Hi, anybody know how to make a screenshot of the current
backbuffer
surface? Maybe integrating it with Klipper or making a
bitmap file of it?
Thanks alot in advance.


Fare thee well,
Bawenang R. P. P.

----------------
ERROR: Brain not found. Please insert a new brain!

“Do nothing which is of no use.” - Miyamoto Musashi.

"I live for my dream. And my dream is to live my life
to the fullest."


_______________________________________________
SDL mailing list
SDLlists.libsdl.org
h
ttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Making a screenshot
country flaguser name
United States
2007-04-11 00:21:48
It is as simple as calling:

SDL_SaveBMP( pSurface,"FILE.BMP" );

The pSurface is a pointer to a SDL_Surface and the string is
the filename to
save it as.

Ken Rogoway
Homebrew Software
http://www.homebrews
oftware.com/

 
-----Original Message-----
From: sdl-bounceslists.libsdl.org [mailto:sdl-bounceslists.libsdl.org] On
Behalf Of benangcs.its.ac.id
Sent: Tuesday, April 10, 2007 9:51 PM
To: sdllists.libsdl.org
Subject: [SDL] Making a screenshot

Hi, anybody know how to make a screenshot of the current
backbuffer
surface? Maybe integrating it with Klipper or making a
bitmap file of it?
Thanks alot in advance.


Fare thee well,
Bawenang R. P. P.

----------------
ERROR: Brain not found. Please insert a new brain!

“Do nothing which is of no use.” - Miyamoto Musashi.

"I live for my dream. And my dream is to live my life
to the fullest."


_______________________________________________
SDL mailing list
SDLlists.libsdl.org
h
ttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.0.0/754 - Release
Date: 4/9/2007
10:59 PM
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.0.0/754 - Release
Date: 4/9/2007
10:59 PM
 

_______________________________________________
SDL mailing list
SDLlists.libsdl.org
h
ttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Making a screenshot
country flaguser name
United States
2007-04-11 01:25:13
> It is as simple as calling:
> 
> SDL_SaveBMP( pSurface,"FILE.BMP" );
> 
> The pSurface is a pointer to a SDL_Surface and the
string is the filename to
> save it as.

Yes. And for OpenGL, call glReadPixels() to get the contents
of the 
OpenGL framebuffer...then you'd need to get the raw pixel
data into some 
format you can use (like a SDL_Surface for SDL_SaveBMP,
etc).

--ryan.




_______________________________________________
SDL mailing list
SDLlists.libsdl.org
h
ttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Making a screenshot
country flaguser name
Indonesia
2007-04-11 01:45:49
Ah, I see thanks guys. Although my first impression about
screenshot would
be copying the surface to a clipboard daemon (eg. Klipper,
or Windows'
Clipboard). But because I don't understand Linux that much,
making a
bitmap file of the surface will be suffice right now. Maybe
I'll explore
more on how to copy the surface's contents to KDE's Klipper
when I have
time. Thanks alot guys.

Ryan C. Gordon said:
>
>> It is as simple as calling:
>>
>> SDL_SaveBMP( pSurface,"FILE.BMP" );
>>
>> The pSurface is a pointer to a SDL_Surface and the
string is the
>> filename to
>> save it as.
>
> Yes. And for OpenGL, call glReadPixels() to get the
contents of the
> OpenGL framebuffer...then you'd need to get the raw
pixel data into some
> format you can use (like a SDL_Surface for SDL_SaveBMP,
etc).
>
> --ryan.
>
>
>
>
> _______________________________________________
> SDL mailing list
> SDLlists.libsdl.org
> h
ttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>


Fare thee well,
Bawenang R. P. P.

----------------
ERROR: Brain not found. Please insert a new brain!

“Do nothing which is of no use.” - Miyamoto Musashi.

"I live for my dream. And my dream is to live my life
to the fullest."


_______________________________________________
SDL mailing list
SDLlists.libsdl.org
h
ttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )