ежедневная и крафты

This commit is contained in:
heyshawtyy committed 2026-11-19 13:46:05 +05:00
1 parent 828297cc6a
commit ce8184576e
31 files changed
+3371

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
Add-Type -AssemblyName System.Drawing
$b = [System.Drawing.Bitmap]::FromFile($args[0])
function PixClass([System.Drawing.Color]$c) {
if ($c.A -lt 100) { return '.' }
if ($c.R -gt 180 -and $c.G -gt 130 -and $c.B -lt 120) { return 'G' }
if ($c.R -gt 200 -and $c.G -gt 200 -and $c.B -gt 200) { return 'W' }
if ($c.R -gt 90 -and $c.G -lt 70) { return 'R' }
return 'x'
}
$s = New-Object System.Text.StringBuilder
for ($x = 0; $x -lt 724; $x += 4) { [void]$s.Append((PixClass ($b.GetPixel($x, 362)))) }
"row362: " + $s.ToString()
foreach ($cx in 110, 615) {
$s = New-Object System.Text.StringBuilder
for ($y = 0; $y -lt 724; $y += 4) { [void]$s.Append((PixClass ($b.GetPixel($cx, $y)))) }
"col$($cx): " + $s.ToString()
}
$b.Dispose()