first commit

This commit is contained in:
2026-05-25 19:07:12 +07:00
commit f29c67bff4
62 changed files with 13196 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
Add-Type -AssemblyName PresentationCore,WindowsBase
$path = 'c:\Users\Administrator\Documents\PaaS\photobooth\src\assets\1.png'
$fs = [System.IO.File]::OpenRead($path)
$decoder = [System.Windows.Media.Imaging.BitmapDecoder]::Create(
$fs,
[System.Windows.Media.Imaging.BitmapCreateOptions]::None,
[System.Windows.Media.Imaging.BitmapCacheOption]::OnLoad
)
$frame = $decoder.Frames[0]
$w = $frame.PixelWidth
$h = $frame.PixelHeight
$stride = $w * 4
$bytes = New-Object byte[] ($stride * $h)
$frame.CopyPixels($bytes, $stride, 0)
$fs.Close()
# Check what colors are actually in the second slot area
Write-Host "Sampling SLOT 2 area (Y 600-700, X 80-530):"
for ($y = 600; $y -le 700; $y += 25) {
$colors = @()
for ($x = 150; $x -le 450; $x += 50) {
$i = ($y * $stride) + ($x * 4)
$b = $bytes[$i]; $g = $bytes[$i + 1]; $r = $bytes[$i + 2]
$colors += "R=$r"
}
Write-Host "Y=$y : $($colors -join ' | ')"
}