修改界面中,临时提交

This commit is contained in:
lik
2026-10-02 10:28:44 +08:00
parent 089e0eb081
commit 55a9c7e3e8
41 changed files with 2458 additions and 451 deletions
+17
View File
@@ -0,0 +1,17 @@
Add-Type -AssemblyName System.Drawing
foreach ($n in 'home-green', 'ai-green', 'mine-green') {
$bmp = [System.Drawing.Bitmap]::FromFile("d:\work\health\code\ws_health\ui\wxapp_escort\images\$n.png")
$counts = @{}
for ($x = 0; $x -lt $bmp.Width; $x += 2) {
for ($y = 0; $y -lt $bmp.Height; $y += 2) {
$p = $bmp.GetPixel($x, $y)
if ($p.A -lt 128) { continue }
$key = '{0},{1},{2}' -f $p.R, $p.G, $p.B
$counts[$key] = [int]$counts[$key] + 1
}
}
$top = $counts.GetEnumerator() | Sort-Object Value -Descending | Select-Object -First 2
$line = ($top | ForEach-Object { "$($_.Key)=$($_.Value)" }) -join ' '
Write-Host "$n : $line"
$bmp.Dispose()
}