{"id":2075,"date":"2020-06-28T13:04:47","date_gmt":"2020-06-28T11:04:47","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=2075"},"modified":"2020-06-28T13:04:47","modified_gmt":"2020-06-28T11:04:47","slug":"dxgi-desktop-snapshot-taking","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/2075","title":{"rendered":"DXGI desktop snapshot taking"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One more system check tool to quickly enumerate available monitors (using <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/direct3ddxgi\/d3d10-graphics-programming-guide-dxgi\">DXGI<\/a>), take snapshots and was them in PNG files (using <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/wic\/-wic-lh\">WIC<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Apart from straightforward desktop snapshot taking, the tool offers a few more functions:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Goes through the entire list of available video adapters and connected monitors<\/li><li>Uses three slightly different methods to do the same thing: &#8220;pass A&#8221; and files starting with &#8220;A&#8221; &#8211; using Direct3D 11; &#8220;pass B&#8221; &#8211; basically the same but with a Direct3D 11 device created without specifying adapter; &#8220;pass C&#8221; &#8211; same as pass A but using Direct3D 10.1 API<\/li><li>Displayed (printed out) are the monitor connected to video adapter outputs, including the case of sharing\/mirroring displays; when two displays are showing the same signal via mirroring the output will list them along with connector type, e.g. same picture is displayed on two physical displays connected with DisplayPort and HDMI cables respectively:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"600\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-794x600.png\" alt=\"\" class=\"wp-image-2076\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-794x600.png 794w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-320x242.png 320w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-768x581.png 768w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1536x1161.png 1536w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-600x454.png 600w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1040x786.png 1040w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image.png 1963w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">Output: \\.\\DISPLAY5<br>  LG Ultra HD, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL, \\?\\DISPLAY#GSM5B09#5&amp;7f9757e&amp;0&amp;UID260#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}<br>  LG Ultra HD, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI, \\?\\DISPLAY#GSM5B08#4&amp;1540260c&amp;0&amp;UID206371#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}<br>D3D_FEATURE_LEVEL_12_0<br>\u00e2\u0153\u201d\u00ef\u00b8\u008f<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>Detects multi-GPU systems and automatically repeats attempt to take snapshots applying different GPU preferences (&#8220;Power Saving&#8221; preference vs. &#8220;High Performance&#8221;); the reason for this is that use of wrong GPU preference is a notorious reason for DXGI Desktop Duplication API to not provide duplication service. Files named A1, A2 (as opposed to A0) correspond to use of power saving (1) or high performance (2) adapter:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"407\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1-800x407.png\" alt=\"\" class=\"wp-image-2077\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1-800x407.png 800w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1-320x163.png 320w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1-768x391.png 768w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1-600x305.png 600w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/image-1.png 949w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>Last but not least, command line option &#8220;-DebugLayers&#8221; enables the tool to include <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/direct3d11\/overviews-direct3d-11-devices-layers#debug-layer\">DirectX Debug Layer<\/a> messages in the option (such as, to troubleshoot errors in greater detail); the layer should be installed, of course.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Download links<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Binaries:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li> 64-bit: <a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2020\/06\/DxgiTakeSnapshot-20200628-72259e71816c9f15f7fa5d72490c01356013eb98.zip\">DxgiTakeSnapshot.exe<\/a>  (in .ZIP archive)<\/li><li> License: This software is free to use<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One more system check tool to quickly enumerate available monitors (using DXGI), take snapshots and was them in PNG files (using WIC). Apart from straightforward desktop snapshot taking, the tool offers a few more functions: Goes through the entire list of available video adapters and connected monitors Uses three slightly different methods to do the&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/2075\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[544,539],"class_list":["post-2075","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-direct3d-11","tag-dxgi"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=2075"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2075\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=2075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=2075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=2075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}