Windows 명령 줄을 통해 두 대의 모니터로 데스크톱을 확장 할 때 두 번째 데스크톱의 스크린 샷을 찍는 방법 요청

미니

내 바탕 화면이 두 대의 모니터로 확장되었으며 명령 줄 (cmd / powershell)에서 두 번째 모니터의 바탕 화면 스크린 샷을 찍고 싶습니다.

어떤 아이디어?

해리 맥

이 (예상되지 않은) PowerShell 코드 조각을 통해 시작할 수 있습니다. 확장 된 화면의 경우 픽셀 좌표는 맨 왼쪽 화면에서 맨 오른쪽 화면까지 두 화면에서 연속적입니다.

$File = "\mypath\myscreenshot.bmp"
Add-Type -AssemblyName System.Windows.Forms
Add-type -AssemblyName System.Drawing
# Gather Screen resolution information
$Screen = [System.Windows.Forms.SystemInformation]::VirtualScreen
$Width = ..2nd monitor width in pixels..
$Height = ..2nd monitor height in pixels..
$Left = ..2nd monitor starting left pixel..
$Top = ..2nd monitor starting top pixel, normally zero..
# Create bitmap using the top-left and bottom-right bounds
$bitmap = New-Object System.Drawing.Bitmap $Width, $Height
# Create Graphics object
$graphic = [System.Drawing.Graphics]::FromImage($bitmap)
# Capture screen
$graphic.CopyFromScreen($Left, $Top, 0, 0, $bitmap.Size)
# Save to file
$bitmap.Save($File) 

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관