uWindowCapture icon indicating copy to clipboard operation
uWindowCapture copied to clipboard

Possible to grab partial desktop?

Open nailbuster opened this issue 3 years ago • 1 comments

Testing latest and it works great!

Is there a setting/possibility/instructions to support capturing Desktop(window title area only)

Capturing window works ok, desktop works ok....but i'd like to capture the window area from desktop (have some overlapped windows in that area)... and don't want to always grab/crop entire desktop.

thanks.

nailbuster avatar May 09 '21 18:05 nailbuster

Sorry for the late reply... Currently, uWindowCapture captures the entire window. However, cropping can be achieved by calculating the UV scale and offset using the width and height of the window, and using the Tiling and Offset parameters of the texture (another asset of mine, uDesktopDuplication, uses this method for cropping: https://github.com/hecomi/uDesktopDuplication/blob/4ba7caf792659d715a61cdf0ef6c0b616cb3b4ff/Assets/uDesktopDuplication/Examples/Scripts/Loupe.cs#L38-L43)

hecomi avatar Jun 05 '21 11:06 hecomi