title: pywinauto capture_as_image adds unwanted borders
body: <p>I am using <strong>pywinauto</strong> to take a screenshot of a specific window.</p>
  
  <p>Here is the code I use to take a capture of notepad ("Bloc-notes" in french) :</p>
  
  <pre><code>from pywinauto import Application
  app = Application().connect(title_re=".*Bloc-notes")
  hwin = app.top_window()
  hwin.set_focus()
  img = hwin.capture_as_image()
  img.save('notepad_screenshot.png')
  </code></pre>
  
  <p>And here is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/N0N9y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N0N9y.png" alt="screenshot"></a></p>
  
  <p>The red "border" is the background of the window. <strong>How can I safely eliminate this red border?</strong></p>
  
  <p>I tried to configure Windows 10 in order not to show windows shadows (in the "visual effects settings") but it has no effect on the size of the capture.</p>
  
  <p>When I look precisely on the capture, I can see that the left, bottom and right borders are 7 pixels thick. Can I reliably remove these pixels? What I mean by "reliably" is: will it always work, and work on other computers?</p>
  
  <p>Any help appreciated.</p>