I scripted this for myself, so now I can click it in rox-filer:
#!/bin/sh
#ss_xwd_ncv.sh creates a snapshot of selected window (or whole screen by selecting background) using xwd & nconvert
sleep 5 && xwd > pic.xwd && nconvert -o ss_xwd_`date "+%H%M%S_%-e%b%y"`.png -out png pic.xwd && rm -f pic.xwd
Requires xwd from Xorg and nconvert (in path) from xnview which is available on the net as binary (not free software, unfortunately).
Creates a snapshot of the content of a single window without borders, with a grace time of 5 secs to bring window to foreground or to arrange other windows overlapping it. Works also with wbar and jwm tray.
If clicking on a free part of background, a screenshot of whole screen will be created.
Creates a unique filename based on time to prevent accidental overwriting of preexisting snapshot, similar to screenshot.sh in TC base.
I guess similar could be adapted to curaga's suggestion of using xwd and netpbm which inspired me to fiddle with this in the first place.