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

Display Scaling and Calibration #52

Closed
alxnull opened this issue Jan 30, 2022 · 23 comments
Closed

Display Scaling and Calibration #52

alxnull opened this issue Jan 30, 2022 · 23 comments
Labels
discussion enhancement New feature or request

Comments

@alxnull
Copy link
Member

alxnull commented Jan 30, 2022

Update: The display scaling & calibration features are now released in v.0.10.0. See http://bluegrams.com/blog/2022/09/display-scaling-and-calibration-with-screenruler.html for explanation.

As the current version of ScreenRuler has various issues with display scaling (issues #28, #31, #45, #51), high-DPI monitors and calibration, version 0.10.0 tries to introduce a new scaling/ calibration mechanism.

This feature is currently tested. You can find a pre-release build here: https://sourceforge.net/projects/screenruler/files/pre-release/ScreenRuler-v.0.10.0-Portable.zip/download. Please try it out and give feedback below, especially if something does not work as expected.

Detailed explanation

Since v.0.10, ScreenRuler is per-monitor DPI-aware by default, i.e. it ...

  • ... automatically and dynamically scales the UI according to Windows' display scaling settings of the current monitor
  • ... can adjust ruler scales according to Monitor pixel densities

The latter feature can be configured in the app via the ruler calibration dialog, which can be accessed either via the context menu (Calibrate Ruler) or by pressing Ctrl+K.

Ruler calibration provides multiple built-in DPI scaling behaviors with different characteristics that are suitable for different use cases:

  • Use scaled pixels: Ruler scales will be based on the virtual/logical DPI values provided by Windows (i.e. 96dpi by default). Additionally, the ruler scale will be scaled corresponding to Windows' display settings for scaling on high-DPI monitors (e.g. assuming 120dpi for a scaling of 125%).

    • When to use? Use this mode to measure items that are scaled by the OS and/or unaware of monitor pixel densities.
      Measurements in this mode might not correspond to physical "off-screen" dimensions.
  • Automatic (per-monitor): Ruler scales will be based on the raw DPI values of each monitor, as provided by the OS. Note that raw DPI values might differ slightly for each monitor and might not match virtual or scaled DPI values directly.
    In this mode, the ruler scale is dynamically adjusted to the raw pixel density of the current monitor.

    • When to use? This mode should provide the most accurate mapping from physical "off-screen" dimensions to "on-screen" dimensions.
      Use this mode to accurately measure items in physical dimensions (such as inches, centimeters etc.)
  • Manual: Manually specify monitor DPI values on which ruler scales will be based. There are two ways to do this: You can directly specify a custom DPI value in the ruler calibration dialog under Monitor DPI -> Horizontal Scaling (DPI)/Vertical Scaling (DPI). Or, you can calibrate ruler scales from the current dimensions of the ruler under the Measuring Unit tab (see Examples). Ruler scales will always be computed from this fixed pixel density value independent of current display scaling or monitor DPI.

    • When to use? Use this mode to calibrate ruler scales independent of OS-based automatic display scaling or monitor pixel densities.
      Useful e.g. if automatic scale adaptations fail or to adjust to an application-specific scale.
  • Manual (per-monitor): Similar to Manual, however, instead of specifying one global DPI value, allows different configurations for each connected monitor. Select the monitor to calibrate from the dropdown below the scaling behavior selection.

    • When to use? To calibrate ruler scales in multi-display setups where each display requires a different calibration.
      Especially useful if automatic scale adaptations fail.
@alxnull alxnull added enhancement New feature or request external-feedback Feedback & requests via other channels (mail etc.) labels Jan 30, 2022
@alxnull alxnull changed the title User feedback: Improve ruler calibration Display Scaling and Calibration Apr 6, 2022
@alxnull alxnull pinned this issue Apr 6, 2022
@alxnull alxnull added discussion and removed external-feedback Feedback & requests via other channels (mail etc.) labels Apr 6, 2022
@PhoenixIV
Copy link

PhoenixIV commented Apr 7, 2022

Hey, I tested the new version and like the tab where I can define the length in cm based on the visible ruler length. This fixes #45 .

Not needed for me at the moment, but would manual mode work with several monitors / per monitor?

  • Maybe get rid of the "bidirectional" dropdown entry and make it a checkbox.
  • Would be nicer if the other axis would update its value together with the main when changed in symmetric mode.
  • In general I think it would be nice if things that are not supported by the chosen mode are simply invisible. E.g. hide the second tab for anything not manual.

Note that the link "How to use" should link to a clean and concise page (maybe even internal).

Thanks for the update. I hope I can help with my ideas.

@NinFanBoyFTW
Copy link

NinFanBoyFTW commented Apr 7, 2022

Everything is working for me. I got this for my Dad years ago and he is extremely happy that he can start using this program again.

@NinFanBoyFTW
Copy link

Ok so I just did a few more tests. It is working on almost all of my computers but there is an issue with 1. On my 40 inch tv it is slightly off and i'm not sure what is causing this. The resolution and the scaling is set to 100% for all monitors but this tv is displaying it wrong

@PhoenixIV
Copy link

Can you please add a photo or screenshot of what you mean?
What is "off"? Are you aware this is a discussion thread only about the calibration component? Did you calibrate your ruler?

@NinFanBoyFTW
Copy link

The measurements are off on 2 displays that I have when I use auto per monitor DPI scaling behavior. Most of my displays I have tried this on it works but these 2 it does not. I am running 27 inch 1080p monitors with 100% scaling in windows

@NinFanBoyFTW
Copy link

I was able to recalibrate the monitors that are giving me a problem by using a ruler up to the screen manually, but this seems to affect everything globally instead of per monitor. Is there a way to add support for manual calibration via measuring units per monitor? Then this would be absolutely perfect

@PhoenixIV
Copy link

I would solve the scaling options window like this:

On the left: Display a list of all monitors. These are selectable.

On the right: Once selected, a configuration window appears for just that monitor.

Hardware-IDs and their settings are saved even when currently not connected.

@alxnull
Copy link
Member Author

alxnull commented Apr 8, 2022

@PhoenixIV Thanks for testing and all your valuable input on improvements!

Maybe get rid of the "bidirectional" dropdown entry and make it a checkbox.

Think this makes sense.

Would be nicer if the other axis would update its value together with the main when changed in symmetric mode.

Yeah, that's indeed how it was planned.

In general I think it would be nice if things that are not supported by the chosen mode are simply invisible. E.g. hide the second tab for anything not manual.

The idea of having the second tab visible at all times was that a user can directly start calibration in this tab without having to know and select the correct mode beforehand. That's why the mode will switch automatically as soon as the controls in the second tab are manipulated.

Note that the link "How to use" should link to a clean and concise page (maybe even internal).

Yes, will update that link for the actual release.

@alxnull
Copy link
Member Author

alxnull commented Apr 8, 2022

@NinFanBoyFTW Thanks for your extensive testing of the preview version!

The measurements are off on 2 displays that I have when I use auto per monitor DPI scaling behavior. Most of my displays I have tried this on it works but these 2 it does not. I am running 27 inch 1080p monitors with 100% scaling in windows

That's interesting. Could you tell me the DPI values that the automatic mode shows on these displays and the DPI values to which you re-calibrated to make it work correctly? Also have you tested all monitors using the same machine/ OS installation? If not, are there any differences in OS version, more specifically in the version/ update of Windows 10/ 11, between the different installations? I'm just trying to find possible reasons that could have caused this behavior.

Is there a way to add support for manual calibration via measuring units per monitor? Then this would be absolutely perfect

This is also feature worth considering, especially with @PhoenixIV's suggestion on the implementation. I'll see if I'll also try to include this in the next version or maybe keep it as an open feature request for a later update.

@NinFanBoyFTW
Copy link

Ok so on one of my monitors the automatic shows up as 81dpi. I then set my ruler to 20 inches and manually set it for more accuracy and the "calibrated" DPI is now 81.45. I know this may sound like a small difference but obviously when we are talking about a tv or larger monitor, once you get to 20+ inches everything starts be be off from a significant amount (1 inch+). I personally would prefer Phoenix's suggestion because I do not keep my TV on all of the time but if I wanted to use this on the TV I want the calibrated DPI I figure out to be per monitor and saved by device ID since the monitor number can differ based on when the monitors are initialized.

@NinFanBoyFTW
Copy link

Also different instances of windows but obviously this is just a small discrepancy between the monitor's reported DPI and its real world output

@alxnull
Copy link
Member Author

alxnull commented Apr 8, 2022

Ok so on one of my monitors the automatic shows up as 81dpi. I then set my ruler to 20 inches and manually set it for more accuracy and the "calibrated" DPI is now 81.45. I know this may sound like a small difference but obviously when we are talking about a tv or larger monitor, once you get to 20+ inches everything starts be be off from a significant amount (1 inch+).

I see, thanks for adding the details. I believe 81dpi is as close as we can get with the automatic mode since the method I'm using to retrieve dpi only returns integer values. So manual calibration would be the only option to get the exact values here.

@NinFanBoyFTW
Copy link

Yeah that is what I figured. The first few inches seem pretty good but because of the difference by the time you get to 10+ inches there is a notable difference in the true measurements. Maybe you could default to auto but when auto is selected, you have a red disclaimer on the calibration page saying that to get fully accurate results you need to calibrate using a ruler. Other than that, the only thing is that for people like me with multiple displays, the manual is just not enough with a global setting instead of per monitor

@alxnull
Copy link
Member Author

alxnull commented Apr 10, 2022

Hey all, I implemented a few further changes based on the feedback given here (download link of the new preview is still the same). Changes include:

  • Converting manual bidirectional mode into a checkbox
  • Adding a new Manual (per-monitor) mode that allows selecting a specific monitor and calibrate each monitor separately.

Please take a look again, thanks!

@NinFanBoyFTW
Copy link

Hi so I just tested everything out and it works great. I tried turning off and on displays to see if it would hold the per display calibration and everything is working perfectly. Thanks so much

@NinFanBoyFTW
Copy link

Ok so I did some more tests and I only have one other thing of note lol. On my laptop and I think many laptops, the monitor comes up in device manager as generic pnp monitor. Because of this, in the calibration menu it just shows up up as a blank box. It still lets me calibrate and works but I am not sure if this lack of an identifier name effects the ability to have multiple monitors store correctly like this. Not a big deal but I figured I would mention it

@alxnull
Copy link
Member Author

alxnull commented Apr 11, 2022

Ok so I did some more tests and I only have one other thing of note lol. On my laptop and I think many laptops, the monitor comes up in device manager as generic pnp monitor. Because of this, in the calibration menu it just shows up up as a blank box. It still lets me calibrate and works but I am not sure if this lack of an identifier name effects the ability to have multiple monitors store correctly like this. Not a big deal but I figured I would mention it

Interesting. This shouldn't be a problem though as the displayed monitor name is not the one used to store the configuration. However, I'll display the (somewhat cryptic) monitor ID in the dropdown for monitors where the display name is blank.

@NinFanBoyFTW
Copy link

That's great. The only other thing I would have to say about this would be that I have 2 monitor setups for all of my computers but plenty of people have 2 or more monitors, and when I go into the calibration menu, the dropdown shows 2 of the exact same name since my monitors are the same model. I'm not sure if you wanted to maybe just add a prefix of the current windows monitor number to the label "only for viewing purposes not config" so that people can understand which monitor they are targeting exactly

@MariuszChm
Copy link

Hey all,
concerning scaling I have an idea of new feature. It would be very useful for some users to read proportional dimensions from i.e. PDF drawings. Asking why? Sometimes you have to measure some dimension of the picture in desired scale. In example: if you have a drawing exported from AutoCAD to PDF with dimension of some room, but you need to measure from PDF the distance of the window from perpendicular wall. It would be nice to:

  1. calibrate ruler with known dimension (i.e. width of the room)
  2. read any other dimension from the picture (i.e. width of the window, distance from next window or the wall and so on).

If you need any further clarification just ask. If this is not right place to put a comment like this - sorry. Unluckily I'm not familiar with C#, so I cannot contribute with coding. But if you need any translation to polish, you can ask me :)

@cottonias
Copy link

+1 on MariuszChm's comment. This is exactly what I am looking for as well. I find I often get graphs either in emails or reports (e.g. PDF files) and do not always have the raw data, so I want to be able to set the scale relative to the scale on the graph on the screen. For example, I have had times where I take a screenshot of running timing sequence and want to see how long a signal is above a certain voltage threshold. Using an onscreen ruler makes this measurement quick, and is very useful for certain scenarios.

Here is a simple example: I have a plot with 6 points, and want to know the value of each point but do not have the raw data. I have the scale on the graph itself. I would like to use the ruler to set the values to match the scale of the graph to find the values of each point.
image

Using the ruler, I would like to be able to:

  1. Set the values of the ruler (0 to 1, with 0.1 steps)
  2. Set the scale by clicking on the screen at 0 and 1 or dragging the corners of the onscreen ruler to resize

Here are the answers I would be looking for:
image

The manual calibrate ruler using points option lets me do this if I scale the graph large enough and click through different horizontal scaling options, so I am definitely very happy to have this tool, but wish the process was easier to find the correct scale. A keyboard shortcut to increase scale, maybe using the scroll wheel on the mouse or a hotkey plus "+" or "-" would be helpful.

Here is the best scaling solution I found with manual adjustments:
image

THank you,
Mark

@alxnull
Copy link
Member Author

alxnull commented Aug 20, 2022

Hey all, I'm finally back for working on this. I've just pushed another preview version with small changes and fixes.

@NinFanBoyFTW The new upload adds ID numbers to the monitor dropdown to easily distinguish all connected monitors. Additionally, there is a button (labeled with "?") that identifies all monitors by showing a small popup with the respective ID (similar to the Windows display settings).

@MariuszChm @cottonias Thanks for your suggestion, this is indeed a useful feature to have. If I'm not mistaken, something similar is already by the "Measuring Unit" tab in the calibration window. The procedure of calibrating in that case looks as follows:

  1. Open the ruler calibration dialog and select Manual from the DPI scaling behavior dropdown.
  2. In the tab control, switch to Measuring Unit and select the measuring unit of interest from the dropdown.
  3. Now, using the standard manipulation methods, adjust the size of the ruler tool to the desired dimensions (e.g. to match a given scale or a given item on or off screen).
  4. Finally, using the given fields in the calibration dialog, define to which dimensions (horizontal and vertical) the current size of the ruler tool should correspond in the selected measuring unit.
  5. ScreenRuler will adjust ruler scale computation such that the defined dimensions match the current size of the ruler tool.

Please let me know how well this existing procedure already fits the use case your describe. What I can definitely add additionally is a shortcut that allows quick calibration using the mouse wheel.

(P.S. @MariuszChm since you mentioned Polish translations: I'm always happy for help with translations! Please head over to issue #14 for a guide on how to contribute translations.)

@alxnull
Copy link
Member Author

alxnull commented Sep 10, 2022

The current display scaling & calibration features are now released in v.0.10.0: http://bluegrams.com/blog/2022/09/display-scaling-and-calibration-with-screenruler.html for explanation.
Closing this issue for now, please continue to add feedback if you have any

@alxnull alxnull closed this as completed Sep 10, 2022
@MariuszChm
Copy link

@alxnull Indeed, Manual scaling is the thing that fits my request! Thanks for the info.
And I will do try to make my input to your project with translation. Soon :)

Have a beautiful day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Development

No branches or pull requests

5 participants