[GH-ISSUE #332] Recording position and size are not scaled on high-density display #277

Closed
opened 2026-02-26 09:30:50 +03:00 by kerem · 9 comments
Owner

Originally created by @ironfroggy on GitHub (Jun 2, 2018).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/332

On a high-density display like a Surface device and presumably others the position and size of the recording region are only half what they should be. Attaching the window i had setup and the recording it made.
s2g_1
s2g_2

Originally created by @ironfroggy on GitHub (Jun 2, 2018). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/332 On a high-density display like a Surface device and presumably others the position and size of the recording region are only half what they should be. Attaching the window i had setup and the recording it made. ![s2g_1](https://user-images.githubusercontent.com/34982/40869577-bcb7d64c-65eb-11e8-92ee-ebcd525ecdb4.png) ![s2g_2](https://user-images.githubusercontent.com/34982/40869578-bcd63ede-65eb-11e8-99da-e9ae74c3e314.png)
kerem 2026-02-26 09:30:50 +03:00
Author
Owner

@NickeManarin commented on GitHub (Jun 2, 2018):

Are you using the latest version, v2.13.3?

<!-- gh-comment-id:394050906 --> @NickeManarin commented on GitHub (Jun 2, 2018): Are you using the latest version, v2.13.3?
Author
Owner

@ironfroggy commented on GitHub (Jun 2, 2018):

Yes. The first thing I did when seeing the problem was to update.

<!-- gh-comment-id:394087431 --> @ironfroggy commented on GitHub (Jun 2, 2018): Yes. The first thing I did when seeing the problem was to update.
Author
Owner

@NickeManarin commented on GitHub (Jun 10, 2018):

Not sure what I'm doing differently, but I could not reproduce this behavior.
I tried with 125% and 150%, using the old or the new recorder, moving or not the recording area.
Can you tell me which scale (or DPI) your Surface screen is using?

<!-- gh-comment-id:396073811 --> @NickeManarin commented on GitHub (Jun 10, 2018): Not sure what I'm doing differently, but I could not reproduce this behavior. I tried with 125% and 150%, using the old or the new recorder, moving or not the recording area. Can you tell me which scale (or DPI) your Surface screen is using?
Author
Owner

@ironfroggy commented on GitHub (Jun 15, 2018):

The scale is at 200%, but I just tested on 150% and get the same kind of results. It seems like Screen2GIF is recording based on unscaled coordinates?

<!-- gh-comment-id:397497013 --> @ironfroggy commented on GitHub (Jun 15, 2018): The scale is at 200%, but I just tested on 150% and get the same kind of results. It seems like Screen2GIF is recording based on unscaled coordinates?
Author
Owner

@NickeManarin commented on GitHub (Jun 24, 2018):

Yes, it's taking a non-scaled position. Do you have multiple screens?

<!-- gh-comment-id:399788420 --> @NickeManarin commented on GitHub (Jun 24, 2018): Yes, it's taking a non-scaled position. Do you have multiple screens?
Author
Owner

@ironfroggy commented on GitHub (Jun 24, 2018):

This happens the same when I have either 1 or 2 screens.

If I were to setup a local dev setup for this, maybe I could help to diagnose it or even fix it...

<!-- gh-comment-id:399796425 --> @ironfroggy commented on GitHub (Jun 24, 2018): This happens the same when I have either 1 or 2 screens. If I were to setup a local dev setup for this, maybe I could help to diagnose it or even fix it...
Author
Owner

@NickeManarin commented on GitHub (Jun 25, 2018):

I tried more situations while the recorder was loaded and also before it was open:
Adding a secondary monitor.
Removing the secondary monitor.
Changing the position of the screen.
Changing the DPI of the secondary screen (while attached to the left/right of the main screen).
Changing the DPI of the main screen.

It would be really helpful if you would debug this. :)
Inside the Recorder.xaml.cs file, there's a method called UpdateScreenDpi(), which gets the DPI of the screen and writes to an auxiliary variable.
That variable is used to decide if the position and size of the recording.

If that variable was not being updated, it will stay 1 which is 100%.
(Thinking about it, I should rename that method to GetScreenScale, haha)

Also, currently the app is not per-monitor DPI-aware. It uses a single DPI for all windows.

<!-- gh-comment-id:399803546 --> @NickeManarin commented on GitHub (Jun 25, 2018): I tried more situations while the _recorder was loaded_ and also _before it was open_: Adding a secondary monitor. Removing the secondary monitor. Changing the position of the screen. Changing the DPI of the secondary screen (while attached to the left/right of the main screen). Changing the DPI of the main screen. It would be really helpful if you would debug this. :) Inside the **[Recorder.xaml.cs](https://github.com/NickeManarin/ScreenToGif/blob/master/ScreenToGif/Windows/Recorder.xaml.cs)** file, there's a method called **[UpdateScreenDpi()](https://github.com/NickeManarin/ScreenToGif/blob/848e610a3a988ee659933fd78a1cd246de1ade50/ScreenToGif/Windows/Recorder.xaml.cs#L116)**, which gets the DPI of the screen and writes to an auxiliary variable. That variable is used to decide if the position and size of the recording. If that variable was not being updated, it will stay 1 which is 100%. _(Thinking about it, I should rename that method to GetScreenScale, haha)_ Also, currently the app is not per-monitor DPI-aware. It uses a single DPI for all windows.
Author
Owner

@NickeManarin commented on GitHub (Jun 25, 2018):

Btw, I asked about the version that you were using, because an old version had this problem.

<!-- gh-comment-id:399803716 --> @NickeManarin commented on GitHub (Jun 25, 2018): Btw, I asked about the version that you were using, because an old version had this problem.
Author
Owner

@NickeManarin commented on GitHub (Sep 27, 2019):

I'm closing this issue as I cannot reproduce anymore.
Also, I changed the way that the app starts and detects the screen DPI.
Even so, if this bug still happens, you can try using the new recorder UI.
Head over to Options > Application > Enable the new recorder UI.

<!-- gh-comment-id:536116481 --> @NickeManarin commented on GitHub (Sep 27, 2019): I'm closing this issue as I cannot reproduce anymore. Also, I changed the way that the app starts and detects the screen DPI. Even so, if this bug still happens, you can try using the new recorder UI. Head over to `Options > Application > Enable the new recorder UI`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#277
No description provided.