31 lines
874 B
PowerShell
31 lines
874 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Join-Path $PSScriptRoot '..'
|
|
$files = @(
|
|
'static/assets/modules/family/f08/f08-reunion-hero.png',
|
|
'static/assets/modules/family/f08/f08-family-portrait.png',
|
|
'static/assets/modules/family/f08/f08-reunion-table.png',
|
|
'static/assets/modules/family/f08/f08-ancestral-home.png',
|
|
'static/assets/modules/family/f08/f08-ancestral-portrait.png'
|
|
)
|
|
|
|
Add-Type -AssemblyName System.Drawing
|
|
|
|
foreach ($file in $files) {
|
|
$path = Join-Path $root $file
|
|
if (-not (Test-Path -LiteralPath $path)) {
|
|
throw "Missing F08 album asset: $file"
|
|
}
|
|
|
|
$image = [System.Drawing.Image]::FromFile($path)
|
|
try {
|
|
if ($image.Width -lt 960 -or $image.Height -lt 720) {
|
|
throw "F08 album asset too small: $file $($image.Width)x$($image.Height)"
|
|
}
|
|
} finally {
|
|
$image.Dispose()
|
|
}
|
|
}
|
|
|
|
Write-Output 'F08-ALBUM-ASSETS-CONTRACT PASS'
|