-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
@lijy91 I hope this powershell script helps to take screenshot silently and somehow connect it to your library:
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$bounds = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
$bitmap = New-Object System.Drawing.Bitmap $bounds.Width, $bounds.Height
$graphics = [System.Drawing.Graphics]::FromImage($bitmap)
$graphics.CopyFromScreen($bounds.Location, [System.Drawing.Point]::Empty, $bounds.Size)
$outputPath = "$env:TEMP\screenshot.png"
$bitmap.Save($outputPath, [System.Drawing.Imaging.ImageFormat]::Png)
Write-Output "Screenshot saved to $outputPath"
Metadata
Metadata
Assignees
Labels
No labels