Screenshotting (invisible) border/shadow

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Milki
Posts: 1
Joined: 28 Oct 2021, 06:45

Screenshotting (invisible) border/shadow

Post by Milki » 28 Oct 2021, 06:46

Hello,
When screenshotting browsers using dimensions from WinMove the browser (client) is a few pixels smaller because of shadows on borders, is it possible to capture screen in RGBA (with Gdip or something else) with those shadows but without the background being visible?

doubledave22
Posts: 343
Joined: 08 Jun 2019, 17:36

Re: Screenshotting (invisible) border/shadow

Post by doubledave22 » 28 Oct 2021, 14:22

I'm not sure I can help directly but many windows have the invisible windows borders (formerly seen in windows 7). From what I can tell, these borders (and sometimes the title bar) come through as transparent when using the gdip functions to gather the pixel data. Is this what you are talking about?

You could try Gdip_BitmapFromHWND function which uses PrintWindow() to get the pixel data. This can be modified using the flag 0x1 which is PW_CLIENTONLY. Perhaps capturing just client only would avoid these borders. There should be some examples in the forums.

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Screenshotting (invisible) border/shadow

Post by malcev » 28 Oct 2021, 14:44

Draw border/shadow by Yourself.

Post Reply

Return to “Ask for Help (v1)”