{"id":1747,"date":"2017-01-07T16:40:03","date_gmt":"2017-01-07T15:40:03","guid":{"rendered":"http:\/\/eskerahn.dk\/?p=1747"},"modified":"2018-10-17T18:04:49","modified_gmt":"2018-10-17T16:04:49","slug":"windows-display-scaling-blurring-legacy-programs","status":"publish","type":"post","link":"https:\/\/eskerahn.dk\/?p=1747","title":{"rendered":"Windows display scaling blurring legacy programs"},"content":{"rendered":"<p>Windows display scaling is great for programs that support it. But certainly not for all.<\/p>\n<p>Especially legacy apps get blurred, so use integer only, if possible!<\/p>\n<p><a href=\"https:\/\/eskerahn.dk\/?p=1747\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1773\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_Small.png\" alt=\"\" width=\"499\" height=\"637\" srcset=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_Small.png 499w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_Small-118x150.png 118w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_Small-235x300.png 235w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<p>The problem is in the very nature of windows history, as it was coded for pixels, and not vectorization.<\/p>\n<p>It made perfect sense back then, to make things snappier. But does not work well on modern high DPI displays.<\/p>\n<p>Newer apps (that are coded correctly!!), can handle the scaling, and thus display their content nice and crisp.<\/p>\n<p>But even a standard C# forms app of newest Visual studio displays the problem per default as can be seen above, for non-integer scaling.<br \/>\nHOWEVER this is often quite easy to make a WinForm app <strong><em>Per Monitor DPI Aware<\/em><\/strong> in minutes!! <a href=\"https:\/\/eskerahn.dk\/?p=1779\" target=\"_blank\" rel=\"noopener\">See this post<\/a>.<\/p>\n<p>Here is a more complete example with the offered scaling on a QFHD\/UHD (3840 x 2160) monitor, from 100% to 350%.<br \/>\nClick to enlarge, and make sure you browser shows the 1520 x 920 in 100% (and you see it on an unscaled display) to see the problem.<\/p>\n<p><a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1770\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage-300x182.png\" alt=\"\" width=\"300\" height=\"182\" srcset=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage-300x182.png 300w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage-150x91.png 150w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage-768x465.png 768w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage-1024x620.png 1024w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage.png 1520w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>You will note that each windows title-line is scaled correctly by Windows for all, but the interior of the form looks horribly blurry for all but the integer (100, 200 &amp; 300%) ones.<br \/>\nFor the integer ones each pixel is scaled to 2&#215;2 or 3&#215;3, and this leaves a sharp though pixelated picture that looks exactly as it would on a coarser monitor.<br \/>\nThat is if you scale a QFHD\/UHD (3840 x 2160) monitor to 300%, the image would look exactly identical to a HD (1280 x 720)\u00a0 monitor of the same size.<br \/>\nAnd if to 200 exactly like FHD monnitor of the same size.<\/p>\n<p>True DPI-aware apps would still look much better than even the integer scaled ones. (click to enlarge, to see how much sharper the text is)<\/p>\n<p><a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_DPI_AWARE.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1816\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_DPI_AWARE-920x1024.png\" alt=\"\" width=\"640\" height=\"712\" srcset=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_DPI_AWARE.png 920w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_DPI_AWARE-135x150.png 135w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_DPI_AWARE-270x300.png 270w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/StretchTest_Crop_Collage_DPI_AWARE-768x855.png 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Apart from that, scaling used with multiple monitor with different scaling, has some odd issues when you move a window, as the WHOLE window is scaled by the factor of the screen where the majority of the window currently is. This is not a big issue, as you seldom want a program-windows to span multiple monitors, especially if they are not more or less identical.<\/p>\n<p>Have a look at these two [click to enlarge to see the real difference], where I have moved the app a bit down (marked the imaginary border by a thin red line), and from being clear and crisp, the font is now woolly as the app gets scaled.<\/p>\n<p><a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1757\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_1-300x240.png\" alt=\"\" width=\"300\" height=\"240\" srcset=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_1-300x240.png 300w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_1-150x120.png 150w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_1-768x614.png 768w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_1-1024x819.png 1024w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_1.png 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1758\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_2-300x240.png\" alt=\"\" width=\"300\" height=\"240\" srcset=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_2-300x240.png 300w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_2-150x120.png 150w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_2-768x614.png 768w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_2-1024x819.png 1024w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/Win10ScaleExample_2.png 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>I have a 40&#8243; QFHD (111DPI) monitor behind and above my 14&#8243; QHD (210DPI) laptop (<a href=\"https:\/\/eskerahn.dk\/?p=1705\" target=\"_blank\" rel=\"noopener\">Thinkpad X1 Yoga<\/a>)<\/p>\n<p style=\"padding-left: 30px;\"><a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/YogaX1_plus_4K_display.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1734\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/YogaX1_plus_4K_display-300x246.png\" alt=\"\" width=\"300\" height=\"246\" srcset=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/YogaX1_plus_4K_display-300x246.png 300w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/YogaX1_plus_4K_display-150x123.png 150w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2017\/01\/YogaX1_plus_4K_display.png 436w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>With the secondary monitor roughly 1.5 times as far away from my eyes as the laptop, 125% is pretty close to making things having the same &#8216;apparent size&#8217; (the angle), since (100%\/111dpi) \/ (125%\/210dpi)=1.51<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows display scaling is great for programs that support it. But certainly not for all. Especially legacy apps get blurred, so use integer only, if possible! &nbsp;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-1747","post","type-post","status-publish","format-standard","hentry","category-pc-and-code-samples"],"_links":{"self":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts\/1747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1747"}],"version-history":[{"count":10,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts\/1747\/revisions"}],"predecessor-version":[{"id":2636,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts\/1747\/revisions\/2636"}],"wp:attachment":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}