R – Windows API to make Windows Vista and 7 semi-transparent screenshots

capturescreenshotwinapiwindows 7windows-vista

Windows Vista and Windows 7 display semi-transparent forms when Aero is activated. And some screen-taking applications such as WinSnap or Windows Clippings are able to capture those windows as a semi-transparent PNG image. What Windows API are they using to obtain such a beautiful capture ?

Best Answer

There isn't any, to my knowledge. If you look closely, at least WindowClippings takes two separate screenshots. One with white background and one with black background. It then uses those two screenshots to calculate the transparency of the glass pixels.