Take a screen shot from command line in Windows
I am looking for a way to take a screenshot of the entire screen from the command line. Operating system is Windows. Something like this:
C:\>screenshot.exe screen1.png
Download imagemagick. Many command line image manipulation tools are included. import allows you to capture some or all of a screen and save the image to a file. For example, to save the entire screen as a jpeg:
import -window root screen.jpeg
If you want to use the mouse to click inside a window or select a screen region & save a a png, just use:
import box.png
This question's already been answered, but I thought I'd throw this in as well. NirCmd (freeware, sadly, not open source) can take screenshots from the command line, in conjunction with the numerous other functions it can do.
Running this from the command line either in nircmd.exe's directory or if you copied it to your system32 folder:
nircmd.exe savescreenshot screen1.png
does what you want. You can also delay it like this:
nircmd.exe cmdwait 2000 savescreenshot screen1.png
That will wait 2000 milliseconds (2 seconds), and then capture and save the screenshot.
it can be done without external tools (you just need installed .net framework ,which is installed by default on everything from vista and above) - screenCapture.bat. It is a selfcompiled C# program and you can save the output in few formats and capture only the active window or the whole screen:
screenCapture- captures the screen or the active window and saves it to a file
Usage:
screenCapture filename.format [WindowTitle]
filename - the file where the screen capture will be saved
format - Bmp,Emf,Exif,Gif,Icon,Jpeg,Png,Tiff and are supported - default is bmp
WindowTitle - instead of capturing the whole screen will capture the only a window with the given title if there's such
Examples:
call screenCapture notepad.jpg "Notepad"
call screenCapture screen.png
Other suggestions are fine -- you could also try MiniCap, which is free and has some other features like flexible file naming and some different capture modes: http://www.donationcoder.com/Software/Mouser/MiniCap/index.html
(disclaimer: I'm the author of MiniCap).