Here is a quick tutorial and a pair of scripts to help you take screenshots (of any region on the screen) and have those go straight to your clipboard. As an intermediate step, I solve the problem of copying an image file to the gnome-clipboard so that it can be pasted in another program.
First, install imagemagick python, and pygtk
Now save the following script somewhere as imgclip.py. This is a simple python script which takes an image file and puts it in the gnome-clipboard.
sudo apt-get install imagemagick python pygtk
To use it:
assert os.path.exists(f), "file does not exist"
image = gtk.gdk.pixbuf_new_from_file(f)
clipboard = gtk.clipboard_get()
Now save the following script somewhere as screenshot.sh
python /path/to/imgclip.py filename.png
Change the appropriate variables to meet your needs. In particular, you must set the path to imgclip.py. Now just make sure that you have run permissions for screenshot.sh by running the following
#directory to put the screenshot file in
#note that files in /tmp/ are deleted automatically on boot
#prefix for filename to be created
#timestamp appended to filename
#extension to save the image as
#path to the imgclip script (also posted in this howto)
#the filename to save the screenshot as
#call imagemagick utility to take the screenshot...
#this will turn the cursor into a cross and you can select an
#area of the screen which is turned into an image
#call imgclip script to copy that image to the clipboard
python $imgclip $file
and then run the script from the shell
chmod +x /your/path/to/screenshot.sh
I've bound this script to the super+S hotkey and the super+alt+button1 mouse click event in compiz for quick use.