Sometimes you want to get a quick screenshot but don't want to go to the lengths of opening up a full blown graphics program like Gimp, Cinepaint, Shutter etc.
If you have ImageMagick installed you can quickly grab an area of the screen you are working on by simply issuing the import command on the fly, giving the resulting file any name you like.
First install ImageMagick
$ sudo yum -y install ImageMagick
Click and Drag shots
$ import screenshot1.png
$ import screenshot2.jpg
$ import screenshot3.gif
$ import screenshot4.tiff
Or resize it on the fly with
$ import -resize 700 blogshot.png
$ import -resize 50 iconicshot.ico
Then drag the mouse around the area you want to capture, on release the resulting file is saved under the name assigned to it.
If you want to capture the entire screen and add a delay so you can open/close something, then that's straightforward
$ sleep 10; import -window root wholescreen.png
This will impart the desired delay and then save the file into the named png '-window root' being the entire screen.
A wide range of filetypes are supported for saving.
You can also resize Fullscreen shots with ImageMagick on the fly, say to 600 pixels
$ import -window root -resize 600 resized600shot.png
Add a sleep function to get things out of the way
$ sleep 5; import -window root -resize 600 noclutter.png
Instant editing in Gimp
You can additionally, take a Fullscreen shot, with or without delay, give the file a name and type, then import straight into Gimp for further editing.
$ import -window root screenshot.png; gimp screenshot.png;
$ sleep 5; import -window root screenshot.png; gimp screenshot.png;
A Quick recap
With Fullscreen shots you would almost always have to add the sleep function to facilitate removing unwanted obstacles, like the terminal in the above.
A shot sized up with the mouse
$ import filename.type
Fullscreen into gimp
$ sleep 5; import -window root filename.type; gimp filename.type;
Fullscreen resized into gimp
sleep 5; import -window root -resize 600 filename.type; gimp filename.type;
The following command takes a Fullscreen shot of the video being watched in SMPlayer, resizes it to 600 then opens it up in Gimp for more editing.
$ sleep 5; import -window root -resize 600 shot.png; gimp shot.png
Favorites from a memorisation point of view are
$ import anygrab.png
$ import -resize 600 anygrab.png
Because you can still grab most of the screen if you place your terminal at the bottom.
Filetypes supported by ImageMagick
Not all the above will be suitable for the import command.
For more information and commands check the help pages.
$ import -help
Which will supply you with many more options and combinations.
For a screenshot program with more features see Shutter.
Labels: Centos 6, import Screenshot with ImageMagick, RHEL