How to snapshot a desktop screen

Hi! I’m french, so i’ll try to be understandable!

so, I want to “snapsot my desktop screen”

with those words, I mean that I want to dump the image that e.g. windows or
linux show to the user, in order to send it via the web (I trie to do a VNC (I
know that it’s not the best way to do it, but it’s for an exam…))

I’ve searched a lot but I didn’t seen anything that seemes to do it…

hopping to be helped, I thank you all :slight_smile:

I’ve seen a few code examples for Windows (the magnifier that comes
with Delphi, for example), and there are quite a few X (Linux, *BSD
etc) screensavers and utilities that do it. (KSnapshot, the GIMP
"Acquire Screenshot" feature, all those lens effects and similar
screensavers…)

However, it’s platform specific stuff, and I don’t think SDL will be
of much help as far as the actual snapshotting part is concerned.

Try searching for “root window” and “HWND 0”, maybe. (I don’t remember
the exact APIs to use; long time since…) Most windowing systems
handle the whole desktop like some sort of full screen “window”, and
that’s the one you want.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Monday 09 January 2006 12:06, bruno wrote:

Hi! I’m french, so i’ll try to be understandable!

so, I want to “snapsot my desktop screen”

with those words, I mean that I want to dump the image that e.g.
windows or linux show to the user, in order to send it via the web
(I trie to do a VNC (I know that it’s not the best way to do it, but
it’s for an exam…))

I’ve searched a lot but I didn’t seen anything that seemes to do
it…

so, I want to “snapsot my desktop screen”

with those words, I mean that I want to dump the image that e.g. windows or
linux show to the user,

In Linux, press , enter “import [filename]”, then use the mouse to
select the portion of the screen to save to “filename”.

HTH,
JeffOn Monday 09 January 2006 03:06 am, bruno wrote: