$ErrorActionPreference = 'Stop' Add-Type -AssemblyName System.Drawing $dir = 'D:\腾讯\吕布\视频资产\分镜' function Build-Sheet($items, $outName, $cols) { $cellW = 700; $cellH = 394; $pad = 12; $labelH = 30 $rows = [math]::Ceiling($items.Count / $cols) $bmp = New-Object System.Drawing.Bitmap (($cols * $cellW + ($cols + 1) * $pad), ($rows * ($cellH + $labelH) + ($rows + 1) * $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 % $cols) * ($cellW + $pad) $y = $pad + [math]::Floor($i / $cols) * ($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 + 3)) } $out = Join-Path $dir $outName $bmp.Save($out, [System.Drawing.Imaging.ImageFormat]::Png) $g.Dispose(); $bmp.Dispose() Write-Host "saved $out" } Build-Sheet @( @('S4-1_aerial.png', 'S4-1 大远景·濮阳冲阵'), @('S4-2_six_silhouettes.png','S4-2 六将剪影围拢'), @('S4-3_parry.png', 'S4-3 戟挑长矛·借势转身'), @('S4-4_butt_strike.png', 'S4-4 戟尾格挡·反打'), @('S4-5_breakout.png', 'S4-5 破围而出') ) '句4_濮阳_五镜.png' 2 Build-Sheet @( @('S5-1_stance.png', 'S5-1 辕门张弓·两军对峙'), @('S5-2_release.png', 'S5-2 弦满箭出'), @('S5-3_hit.png', 'S5-3 箭钉戟枝') ) '句5_辕门射戟_三镜.png' 2 Build-Sheet @( @('S6-1_fengting.png', 'S6-1 凤仪亭夜帐'), @('S6-2_candlekill.png', 'S6-2 戟影烛灭'), @('S6-3_rainhalberd.png', 'S6-3 雨夜画戟倒插'), @('S6-4_redplume.png', 'S6-4 泥水红翎') ) '句6_连环计下邳_四镜.png' 2 Build-Sheet @( @('S7-1_roar.png', 'S7-1 戟指怒吼'), @('S7-2_army.png', 'S7-2 万军后退'), @('S7-3_eyes.png', 'S7-3 眼神锁定'), @('S7-4_lonevsmass.png', 'S7-4 单骑对万军') ) '句7_宣言_四镜.png' 2 Build-Sheet @( @('S8-8_gamereveal.png', 'S8-8 游戏渲染亮相'), @('S9-1_surround.png', 'S9-1 三面围拢'), @('S9-2_halberdglow.png', 'S9-2 戟刃蓄势'), @('S10-1_hit1.png', 'S10-1 普攻①横挥'), @('S10-2_hit2.png', 'S10-2 普攻②反手斩'), @('S10-3_hit3.png', 'S10-3 普攻③戟尾捣'), @('S10-4_sweep.png', 'S10-4 普攻④八格扇形横扫'), @('S10-5_crack.png', 'S10-5 护甲裂纹'), @('S10-7_finale.png', 'S10-7 戟尖挑起·收势'), @('S11-1_pinup.png', 'S11-1 定妆·戟拄地') ) '句8-11_游戏段_十镜.png' 2