2 <!DOCTYPE book PUBLIC
"-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3 <!ENTITY kappname
"&ksnapshot;">
4 <!ENTITY package
"kdegraphics">
5 <!ENTITY % addindex
"IGNORE">
6 <!ENTITY % English
"INCLUDE" > <!-- change language only here -->
9 <book lang=
"&language;">
12 <title>The
&ksnapshot; Handbook
</title>
16 <firstname>Richard
</firstname>
17 <othername>J.
</othername>
18 <surname>Moore
</surname>
20 <address>&Richard.J.Moore.mail;
</address>
25 <firstname>Robert
</firstname>
26 <othername>L.
</othername>
27 <surname>McCormick
</surname>
29 <address>&Robert.L.McCormick.mail;
</address>
34 <firstname>Brad
</firstname>
35 <surname>Hards
</surname>
37 <address>&Brad.Hards.mail;
</address>
41 <othercredit role=
"reviewer">
42 <firstname>Lauri
</firstname>
43 <surname>Watts
</surname>
45 <address>&Lauri.Watts.mail;
</address>
47 <contrib>Reviewer
</contrib>
50 <othercredit role=
"developer">
51 <firstname>Richard
</firstname>
52 <othername>J
</othername>
53 <surname>Moore
</surname>
55 <address>&Richard.J.Moore.mail;
</address>
57 <contrib>Developer
</contrib>
60 <othercredit role=
"developer">
61 <firstname>Matthias
</firstname>
62 <surname>Ettrich
</surname>
64 <address>&Matthias.Ettrich.mail;
</address>
66 <contrib>Developer
</contrib>
69 <!-- TRANS:ROLES_OF_TRANSLATORS -->
73 <year>1997-
2000</year>
74 <holder>&Richard.J.Moore;
</holder>
79 <holder>&Matthias.Ettrich;
</holder>
82 <legalnotice>&FDLNotice;</legalnotice>
84 <date>2006-
07-
05</date>
85 <releaseinfo>0.7</releaseinfo>
88 <para>&ksnapshot; is a simple applet for taking screenshots. It is capable
89 of capturing images of the whole desktop, a single window, a section of a window or a selected
90 region. The images can then be saved in a variety of formats.
</para>
94 <keyword>KDE
</keyword>
95 <keyword>KSnapshot
</keyword>
96 <keyword>kdegraphics
</keyword>
97 <keyword>screen capture
</keyword>
98 <keyword>screen grab
</keyword>
103 <chapter id=
"introduction">
104 <title>Introduction
</title>
106 <para>&ksnapshot; is a simple applet for taking screenshots. It is capable
107 of capturing images of the whole desktop, a single window, a section of a window or a selected
108 region. The images can then be saved in a variety of formats.
</para>
110 <para>Please report any problems or feature requests to the
<ulink
111 url=
"http://bugs.kde.org/wizard.cgi">&kde; Bug Tracking System
</ulink></para>
115 <chapter id=
"using-ksapshot">
116 <title>Using
&ksnapshot;</title>
118 <para>This chapter describes the use of
&ksnapshot; for capturing screen
121 <sect1 id=
"starting">
122 <title>Starting
&ksnapshot;</title>
124 <para>&ksnapshot; may be started by one of several ways as described
129 <para>You may start
&ksnapshot; by selecting it from the
<menuchoice>
130 <guimenu>K-Menu
</guimenu><guisubmenu>Graphics
</guisubmenu>
131 <guimenuitem>&ksnapshot; (Screen Capture Program)
</guimenuitem></menuchoice>.
134 <para>You may start
&ksnapshot; by entering the following at the command
137 <prompt>%
</prompt> <command>ksnapshot
&</command>
140 <listitem><para>The mini command line (invoked with
141 <keycombo action=
"simul">&Alt;<keycap>F2
</keycap></keycombo>) may
142 also be used to start
&ksnapshot;</para></listitem>
145 <para>Once
&ksnapshot; starts, you will see a window like the following:
148 <imagedata fileref=
"window.png" format=
"PNG"/>
150 <textobject><phrase>&ksnapshot; Preview Window
</phrase>
157 <sect1 id=
"taking-snapshot">
158 <title>Taking A Snapshot
</title>
160 <para> &ksnapshot; grabs an image of your entire desktop immediately after it is
161 started, but before it displays itself on screen. This allows you to quickly
162 create full-desktop screenshot images.
</para>
164 <para>The snapshot taken by
&ksnapshot; is displayed in the preview window,
165 which is located in the upper left of the
&ksnapshot; application window.
166 Below is an example of the preview window from
&ksnapshot;. Your preview
167 will differ depending on what you have displayed on the desktop.
</para>
171 <imagedata fileref=
"preview.png" format=
"PNG"/>
173 <textobject><phrase>&ksnapshot; Preview Window
</phrase>
177 <para>The snapshot can be saved by clicking on
178 the
<guibutton>Save As...
</guibutton> button. This opens the standard
&kde; save dialog,
179 where you can choose the filename, the folder location, and the format that your snapshot
180 will be saved in. If multiple snapshots are taken, the
181 filename is automatically incremented to prevent you from overwriting previous
182 snapshots. You may however edit the filename to anything you wish, including the name
183 of a previously saved snapshot.
</para>
185 <para>To take a snapshot of a single window, select the
<guilabel>Window
186 Under Cursor
</guilabel> combo box entry (next to the
<guilabel>Capture mode:
</guilabel>
187 label), and then click on the
<guibutton>New Snapshot
</guibutton> button.
</para>
189 <para>Depending on your
<guilabel>Snapshot delay:
</guilabel> settings you
190 get either a cross as the mouse pointer (for
<guilabel>No delay
</guilabel>),
191 or a standard mouse cursor which you can use to work with a program until
192 the delay is over and a snapshot is taken.
</para>
194 <para>With
<guilabel>No delay
</guilabel>, the snapshot is taken immediately when you
195 click into a window.
</para>
197 <para>&ksnapshot; will display the new snapshot in the preview
198 area, at which time you can choose to save the new image (by pressing
199 <guibutton>Save As...
</guibutton>)
200 or to grab a new one, by pressing the
201 <guibutton>New Snapshot
</guibutton> button.
</para>
203 <para>To take a new snapshot of the entire desktop, select the
204 <guilabel>Full Screen
</guilabel> combo box entry and then click on the
205 <guibutton>New Snapshot
</guibutton> button.
206 &ksnapshot; will now capture the entire desktop if you press
207 <guibutton>New Snapshot
</guibutton>.
</para>
209 <para>Similarly, to take a snapshot of a region, select the
210 <guilabel>Region
</guilabel> combo box entry and set the
211 <guilabel>Snapshot delay
</guilabel> to
<guilabel>No delay
</guilabel>,
212 and then click on the
<guibutton>New Snapshot
</guibutton> button. The
213 mouse cursor will then change into a cross, and you can then use the
214 mouse to select the region you want to capture.
</para>
216 <para>To take a new snapshot of a section of a window, select the
217 <guilabel>Section of Window
</guilabel> combo box entry and then click on the
218 <guibutton>New Snapshot
</guibutton> button. With
<guilabel>No delay
</guilabel>
219 you get a cross as the mouse pointer and you have to click once with the
&LMB; into
220 the window. The section of the window under the mouse cursor is now highlighted
221 with a red border. Move the mouse to the wanted section and click the
&LMB;
222 to capture the screenshot.
227 <sect1 id=
"additional-features">
228 <title>Additional Features
</title>
231 <title>Snapshot Delay
</title>
233 <para>The
<guilabel>Snapshot Delay:
</guilabel> box allows you to enter an
234 arbitrary time delay, in seconds, between the time that you press the
235 <guibutton>New Snapshot
</guibutton> button and the time that the snapshot is
238 <para>When a delay time has been set, you do not have to click the mouse
239 button to capture a screenshot. This enables you to open a drop down menu,
240 and take a picture of it.
</para>
244 <sect2 id=
"window-decoration">
245 <title>Exclude Window decorations
</title>
247 <para><guilabel>Include window decorations
</guilabel> is enabled by default.
</para>
249 <para>When you only want to capture the application itself without the surrounding
250 window decoration, disable this option and take a new snapshot.
</para>
254 <sect2 id=
"print-snapshot">
257 <para>When you want to print your snapshot from the preview, just click
258 <guibutton>Print...
</guibutton> and you get the standard
&kde; Print dialog, from
259 where you can directly print your snapshot.
</para>
262 <sect2 id=
"copy-snapshot">
263 <title>Copy to Clipboard
</title>
265 <para>When you want to edit your snapshot in a graphics application without saving
266 the snapshot, just click
<guibutton>Copy to Clipboard
</guibutton> and insert the image
267 into a viewer or graphics application.
</para>
271 <sect2 id=
"bottom-buttons">
272 <title>Buttons
</title>
274 <para>There are two further buttons located at the bottom of the
275 &ksnapshot; window. Their function is described below.
</para>
279 <term><guibutton>Help
</guibutton></term>
280 <listitem><para>Gives you a menu where you can open the
281 <guimenuitem>&ksnapshot; Handbook
</guimenuitem>, report a bug or
282 get some more information
<guimenuitem>About
&ksnapshot;</guimenuitem>
283 and
<guimenuitem>About
&kde;</guimenuitem>.
288 <term><guibutton>Quit
</guibutton></term>
289 <listitem><para>Quits the
&ksnapshot; application.
</para></listitem>
299 <title>&DCOP; Interface
</title>
301 <para>&ksnapshot; can be scripted using its
&DCOP; interface. This
302 chapter explains the various
&DCOP; calls that you can use, and
303 provides some examples of how you can use them.
</para>
305 <para>As with all
&DCOP; calls, you need to specify the application
306 you want to interface with, and the particular interface. With
&ksnapshot;
307 you need to identify which particular application, which is
308 <literal>ksnapshot-
</literal> followed by the process number.
</para>
310 <para>To start
&ksnapshot; and obtain the right argument, use
311 <command>dcopstart ksnapshot
</command>, which returns the
312 argument (such as
<computeroutput>ksnapshot-
20594</computeroutput>) on
313 standard output.
</para>
315 <para>You can get a list of the available
&DCOP; interfaces, use
316 the right arguments, as shown in this example:
318 <prompt>$
</prompt> <command>dcop `dcopstart ksnapshot` interface
</command><computeroutput>
319 QCStringList interfaces()
320 QCStringList functions()
325 bool save(QString filename)
328 void setTime(int newTime)
330 void setURL(QString newURL)
331 void setGrabMode(int grab)
333 void slotMovePointer(int x,int y)
340 In the examples following, the process is always
341 <computeroutput>ksnapshot-
23151</computeroutput>.
344 <sect1 id=
"dcop-settings">
346 <title>&DCOP; Access to Settings
</title>
348 <para>For each of the settings that you can control with the
349 &GUI;, you can both obtain the current status of that setting,
350 and modify the setting, using
&DCOP;.
353 <para>You can obtain the current capture mode using
354 <literal>grabMode
</literal>, as shown below:
356 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface grabMode
</command>
358 This will return
<computeroutput>0</computeroutput> for full-screen capture,
359 <computeroutput>1</computeroutput> for window capture, and
<computeroutput>2</computeroutput>
363 <para>You can set the capture mode using
<literal>setGrabMode
</literal>,
364 which requires an argument to identify the mode required (as for
<literal>grabMode
</literal>).
365 So you can set window capture mode (
<command>1</command>), using:
367 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface setGrabMode
1</command>
371 <para>You can obtain the current timeout setting (the
<guilabel>Snapshot delay:
</guilabel>
372 &GUI; item) using
<literal>timeout
</literal>, as shown below:
374 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface timeout
</command>
376 This will return the timeout setting in seconds, or zero if there is no delay
380 <para>You can set the timeout using
<literal>setTime
</literal>,
381 which requires an argument to identify the timeout duration. So you can
382 set a delay of
4 seconds using:
384 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface setTime
4</command>
388 <para>You can obtain the path that the snapshot will be saved to using
389 <literal>url
</literal>, as shown below:
391 <prompt>$
</prompt><command>dcop ksnapshot-
23151 interface url
</command>
393 This will return the filename, as a
&URL; (eg as
394 <computeroutput>file:///home/bradh/test2.png
</computeroutput>).
397 <para>You can set the path using
<literal>setURL
</literal>,
398 which requires a string argument to identify the new path. So you can
399 set the path to
<literal>file:///home/bradh/snapshot.jpg
</literal>
402 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface setURL file:///home/bradh/snapshot.jpg
</command>
408 <sect1 id=
"dcop-snapshot">
409 <title>Taking Screenshots with
&DCOP;</title>
412 The key to taking screenshots with
&DCOP; is use of
<literal>slotGrab
</literal>,
415 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface slotGrab
</command>
420 This will take a snapshot using the current snapshot mode and timeout settings
421 (as described above). If you want to save the snapshot image, there are a
422 number of calls you can use. If you just want to save the image to the current
423 path (as returned by
<literal>url
</literal> or changed by
424 <literal>setURL
</literal>), you can use
<literal>slotSave
</literal>, as shown
427 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface slotSave
</command>
432 If you want the user to be able to specify a filename (and path), you can use
433 <literal>slotSaveAs
</literal>, which will bring up a standard
&kde; file
437 If you want to save the image to a different name (or path) without
438 changing the path with
<literal>setURL
</literal>, you can use
439 <literal>save
</literal>, providing the
&URL; to save to as an argument. So if you
440 want to save the snapshot to
<filename>file:///tmp/tempshot.png
</filename>, you
441 can do the following:
443 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface save file:///tmp/tempshot.png
</command>
445 Note that this will return true if the snapshot was successfully saved, and false
446 otherwise. Also, you should be aware that if the file already exists, the user
447 will get a standard
&kde; dialog that requires the user to decide whether to overwrite
452 In addition to saving the snapshot, you can also copy it to the clipboard, using
453 <literal>slotCopy
</literal>, as shown below:
455 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface slotCopy
</command>
460 If you need to select a window that may not be under the mouse cursor, you
461 can use
<literal>slotMovePointer
</literal>, passing the x position
462 (in screen pixels) and the y position (also in screen pixels) as arguments.
463 So to move the mouse to the top left hand corner of the screen (
0,
0), you
464 can do the following:
466 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface slotMoveMouse
0 0</command>
471 <sect1 id=
"dcop-print">
472 <title>Printing Screenshots with
&DCOP;</title>
475 You can print the current screenshot (which may or may not have been saved)
476 using
<literal>printSlot
</literal>, as shown below:
478 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface slotPrint
</command>
483 Note that this will bring up the normal
&kde; print dialog, which may require
489 <sect1 id=
"dcop-exit">
490 <title>&DCOP; Application control
</title>
493 You can cause
&ksnapshot; to exit by using
<literal>exit
</literal>,
496 <prompt>$
</prompt> <command>dcop ksnapshot-
23151 interface exit
</command>
504 <chapter id=
"credits">
506 <title>Credits and License
</title>
508 <para>Program copyright
</para>
510 <listitem><para>1997-
2000 &Richard.J.Moore; &Richard.J.Moore.mail;
</para></listitem>
511 <listitem><para>2000 &Matthias.Ettrich; &Matthias.Ettrich.mail;
</para></listitem>
514 <para>Documentation based on the original, copyright
1997-
2000 &Richard.J.Moore;
515 &Richard.J.Moore.mail;
</para>
516 <!-- TRANS:CREDIT_FOR_TRANSLATORS -->
523 &documentation.index;
528 sgml-minimize-attributes: nil
529 sgml-general-insert-case: lower