Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image is cut with multiple displays and 125% DPI setting #6

Open
lostmsu opened this issue May 23, 2022 · 1 comment
Open

Image is cut with multiple displays and 125% DPI setting #6

lostmsu opened this issue May 23, 2022 · 1 comment

Comments

@lostmsu
Copy link

lostmsu commented May 23, 2022

I have two displays:

  1. 2560x1440 in portrait orientation (vertical, so actually 1440x2560), set to 125% scaling; on the left side
  2. 3840x2160 in landscape orientation (horizontal) also set to 125% scaling; on the right

When I launch SimpleRecorder and select the "All displays" option despite the selection dialog showing correct preview I get incorrect GraphicsCaptureItem.Size. This causes the final video to be cut both on the right side and at the bottom.

On the image: Calculator fills the top part of the left display 1. Visual Studio fills the right part of the right display 2. Area above Visual Studio does not belong to any monitor because left display height = 2560px > right display height 2160px
image

In the recording: taskbar on the left display is cut, and so is the bottom and right sides of Visual Studio on the right display.

RecordingBug.mp4

Environment

OS: Windows 10 21H2
Process DPI awareness: PerMonitorV2 (tried with other options too to no avail).

Expected

Width = 1,440 + 3,840 = 5,280px
Height = 2,560px (tallest)

Actual

Width = 4,224 (looks suspiciously like 5,280 / 1.25)
Height = 2050 (also suspiciously close to 2,560 / 1.25)

P.S.

I played with the code, and if I appropriately scale up GraphicsCaptureItem.Size.Width and .Height to the size of the area in physical pixels, the recording is not cut.

I am afraid to try on multiple screens with different scaling 👀

lostmsu added a commit to lostmsu/SimpleRecorder that referenced this issue May 24, 2022
@lostmsu
Copy link
Author

lostmsu commented May 24, 2022

Tried with multiple screens with different scaling settings (2x125% + 1x100%), and it looks like indeed the correct behavior here for the GraphicsCaptureItem.Size would be to return size in raw pixels. Currently it seems to return scaled ones instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant