Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you are looking for a finished application, there is <a href="http://www.7capture.com/" rel="noreferrer">7capture</a>, which captures also the translucency, so images can be saved to PNG format for later compositing.</p> <p>EDIT:</p> <p>The original question and comments indicate you are looking to produce a region on Windows Vista/7 that you can then use to mask out parts the captured image, as is done with Windows XP and non-Aero UIs. Using a region is not going to give you the result you are looking for, since the window outline is not computed as a region, but as an image with variable transparency - RGBA. The Alpha channel in that image is your mask, but it's not an on-off mask like a region, but a gradual mask with a range of values from pixels being fully included to being fully masked out. </p> <p>Although it uses undocumented APIs, the code at <a href="http://spazzarama.wordpress.com/2009/02/12/screen-capture-with-vista-dwm/" rel="noreferrer">http://spazzarama.wordpress.com/2009/02/12/screen-capture-with-vista-dwm/</a> will capture to a RGBA buffer which you can then use to render or save the image with the shadow and other translucency effects intact.</p> <p>In <code>DwmCapture.cs</code> Change</p> <pre><code>BackBufferFormat = Format.X8R8G8B8 </code></pre> <p>to</p> <pre><code>BackBufferFormat = Format.A8R8G8B8 </code></pre> <p>(X8->A8)</p> <p>And you should then be able to access both the usual RGB data plus transparency from the captured buffer. This can then be saved as a PNG or other format with alpha-channel for composing.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload