$ErrorActionPreference = 'Stop' Add-Type -AssemblyName System.Drawing $dir = 'D:\腾讯\吕布\视频资产\全脚本空场景' Copy-Item -LiteralPath 'D:\腾讯\吕布\视频资产\分镜\G1_game_scene.png' -Destination (Join-Path $dir 'S09_游戏古战场_高饱和.png') -Force $items = @( @('S01_虎牢关外古道_冬晨.png', 'S01 虎牢关外·古道'), @('S02_虎牢关前关道_晨.png', 'S02 虎牢关前·关道'), @('S03_虎牢关下战场_正午.png', 'S03 虎牢关下·战场'), @('S04_凤仪亭内帐_夜.png', 'S04 凤仪亭·内帐'), @('S05_董卓营帐_夜.png', 'S05 董卓营帐'), @('S06_濮阳城外战场_黄昏.png', 'S06 濮阳城外·黄昏'), @('S07_辕门营地_日间.png', 'S07 辕门·日间'), @('S08_下邳雨夜城墙_夜雨.png', 'S08 下邳·雨夜'), @('S09_游戏古战场_高饱和.png', 'S09 游戏古战场') ) $cellW = 560; $cellH = 315; $pad = 12; $labelH = 32 $bmp = New-Object System.Drawing.Bitmap((3 * $cellW + 4 * $pad), (3 * ($cellH + $labelH) + 4 * $pad)) $g = [System.Drawing.Graphics]::FromImage($bmp) $g.Clear([System.Drawing.Color]::FromArgb(16,16,16)) $g.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic $font = New-Object System.Drawing.Font('Microsoft YaHei', 12, [System.Drawing.FontStyle]::Bold) for ($i = 0; $i -lt $items.Count; $i++) { $img = [System.Drawing.Image]::FromFile((Join-Path $dir $items[$i][0])) $x = $pad + ($i % 3) * ($cellW + $pad) $y = $pad + [math]::Floor($i / 3) * ($cellH + $labelH + $pad) $g.DrawImage($img, $x, $y, $cellW, $cellH) $img.Dispose() $g.DrawString($items[$i][1], $font, [System.Drawing.Brushes]::White, $x, ($y + $cellH + 4)) } $out = Join-Path $dir '全脚本空场景_九宫格.png' $bmp.Save($out, [System.Drawing.Imaging.ImageFormat]::Png) $g.Dispose(); $bmp.Dispose() Get-Item $out | Select-Object FullName, Length