Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Grab !


  • Please log in to reply
2 replies to this topic
Beastmaster
  • Members
  • 191 posts
  • Last active: Apr 23 2007 02:58 PM
  • Joined: 15 Apr 2004

Capture of Windows to Image Files
The capture of displayed windows to image files can be done by any number of avaialble utility programs, including the use of the Alt-PrintScreen mechanism of Windows 9x itself. The grab.exe command line utility is still another capture program that is adapted for use with Tcl/Tk scripts.

Installing the program
Download the grab 1.0 archive. Uncompress it in a directory that is in your current path (for example, the \windows directory). The program is now ready to run from a command prompt.

Command format
The general format of the command line call to this application is:

grab -c -h -l -p -r -w -t title -f name -d value

where the options have the following uses:

-c Places the output on the clipboard
-h Displays a help message
-l Produces a list of the windows that can be captured
-r Specifies that child windows should be included
-w Specifies that both client and non client window regions should be captured
-t Specified the window title of the target window
-f Specifies a file name for the captured image
-d Specifies a color depth for the captured image (1,4,8 or 24)
-p Causes the target window to pop up to the top the display stack

Clearly, some parameters are exclusive of others. Specifying -c will send the output to the clipboard, so a file name is not required. Similarly, the -l option does not result in any capture, but produces a list of the captureable windows on standard output in Tcl list format.

The default color depth for capture is that of the current display device. If you wish to reduce the color depth to some smaller value than your default, then the -d parameter can be used. The color space reduction is done by dithering, so the result may not be entirely pleasing to the eye if the colors used in the captured window are not similar to those used in standard palettes for the associated depths. Note that is rarely makes sense to use this option to inflate the color depth.



Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Nice, but where do you get one? :)

Beastmaster
  • Members
  • 191 posts
  • Last active: Apr 23 2007 02:58 PM
  • Joined: 15 Apr 2004
Oops ..., so [Grab!] 8)