sky/scripts/crop_top.ps1
root 6ed55254a0 chore: initial import of sky project
Go + PostgreSQL + Valkey backend (cmd/internal/migrations),
uni-app mobile frontend, PC web (web/), admin console (admin/),
Android WebView container (android_project/).
Build artifacts, node_modules, local env and debug screenshots excluded.
2026-11-09 22:22:44 +08:00

16 lines
668 B
PowerShell

Add-Type -AssemblyName System.Drawing
$src = [System.Drawing.Image]::FromFile('C:\Users\12914\Desktop\sky\hmr_live.png')
$w = $src.Width
$h = $src.Height
$cropH = [int]($h * 0.18)
$bmp = New-Object System.Drawing.Bitmap($w, $cropH)
$g = [System.Drawing.Graphics]::FromImage($bmp)
$rectSrc = New-Object System.Drawing.Rectangle(0, 0, $w, $cropH)
$rectDst = New-Object System.Drawing.Rectangle(0, 0, $w, $cropH)
$g.DrawImage($src, $rectDst, $rectSrc, [System.Drawing.GraphicsUnit]::Pixel)
$bmp.Save('C:\Users\12914\Desktop\sky\hmr_live_top.png', [System.Drawing.Imaging.ImageFormat]::Png)
$g.Dispose()
$bmp.Dispose()
$src.Dispose()
Write-Output "cropped: ${w}x${cropH}"