$ErrorActionPreference = "Stop" Set-Location D:\Workspace\Temp\SpineWallpaper $sizes = @( @(3440, 1440, "219"), @(1920, 1080, "169"), @(1080, 1920, "916") ) $props = @{ "xilian" = "" "kv37" = "&__props=%7B%22preset%22%3A%22kv37%22%7D" } New-Item -ItemType Directory -Force -Path tools\shots\fit | Out-Null foreach ($p in @("xilian", "kv37")) { foreach ($s in $sizes) { $w = $s[0]; $h = $s[1]; $tag = $s[2] $url = "http://127.0.0.1:8190/?__freeze=1" + $props[$p] Write-Host "=== $p $tag ($w x $h) ===" node tools/shot.mjs "tools/shots/fit/${p}_${tag}.png" $url $w $h 2>&1 | Select-Object -First 1 node tools/shot.mjs "tools/shots/fit/${p}_${tag}_ref.png" "$url&__hide=canvas" $w $h 2>&1 | Select-Object -First 1 node tools/subject.mjs "tools/shots/fit/${p}_${tag}.png" "tools/shots/fit/${p}_${tag}_ref.png" Write-Host "" } }