Oddly-shaped windows are a pain to screen grab. Netpbm to the rescue!
- Make a blue (or green, or whatever isn’t used in your window) image larger than the window, like this:
ppmmake blue 800 600 | pnmtopng > ~/Desktop/b.png
- Display the image, and arrange your program in front of it.
- Take a screenshot.
- Crop the image, and set the background transparent.
pngtopnm Screen\ shot\ 2011-03-27\ at\ 10.12.52\ .png |\ pnmcrop |\ pnmtopng -transparent blue > ICP-2007.png
Ta-dah!
(and yeah, this is a Windows program running under Wine on OS X …)