diff --git a/apps/web/public/images/items/ash-blade.png b/apps/web/public/images/items/ash-blade.png new file mode 100644 index 0000000..a0365f3 Binary files /dev/null and b/apps/web/public/images/items/ash-blade.png differ diff --git a/apps/web/public/images/items/ash-boots.png b/apps/web/public/images/items/ash-boots.png new file mode 100644 index 0000000..0e6d7fa Binary files /dev/null and b/apps/web/public/images/items/ash-boots.png differ diff --git a/apps/web/public/images/items/ash-pelt.png b/apps/web/public/images/items/ash-pelt.png new file mode 100644 index 0000000..a6c49bc Binary files /dev/null and b/apps/web/public/images/items/ash-pelt.png differ diff --git a/apps/web/public/images/items/bandit-blade.png b/apps/web/public/images/items/bandit-blade.png new file mode 100644 index 0000000..ef701f9 Binary files /dev/null and b/apps/web/public/images/items/bandit-blade.png differ diff --git a/apps/web/public/images/items/bandit-hood.png b/apps/web/public/images/items/bandit-hood.png new file mode 100644 index 0000000..9d881e0 Binary files /dev/null and b/apps/web/public/images/items/bandit-hood.png differ diff --git a/apps/web/public/images/items/borderwatch-sigil.png b/apps/web/public/images/items/borderwatch-sigil.png new file mode 100644 index 0000000..2239257 Binary files /dev/null and b/apps/web/public/images/items/borderwatch-sigil.png differ diff --git a/apps/web/public/images/items/burned-captain-pendant.png b/apps/web/public/images/items/burned-captain-pendant.png new file mode 100644 index 0000000..26a4d02 Binary files /dev/null and b/apps/web/public/images/items/burned-captain-pendant.png differ diff --git a/apps/web/public/images/items/guardsman-legs.png b/apps/web/public/images/items/guardsman-legs.png new file mode 100644 index 0000000..9392dd3 Binary files /dev/null and b/apps/web/public/images/items/guardsman-legs.png differ diff --git a/apps/web/public/images/items/raider-gloves.png b/apps/web/public/images/items/raider-gloves.png new file mode 100644 index 0000000..3de8a40 Binary files /dev/null and b/apps/web/public/images/items/raider-gloves.png differ diff --git a/apps/web/public/images/items/reinforced-leather-jacket.png b/apps/web/public/images/items/reinforced-leather-jacket.png new file mode 100644 index 0000000..6c44d43 Binary files /dev/null and b/apps/web/public/images/items/reinforced-leather-jacket.png differ diff --git a/apps/web/public/images/items/small-healing-potion.png b/apps/web/public/images/items/small-healing-potion.png new file mode 100644 index 0000000..6465bb4 Binary files /dev/null and b/apps/web/public/images/items/small-healing-potion.png differ diff --git a/apps/web/public/images/items/worn-short-sword.png b/apps/web/public/images/items/worn-short-sword.png new file mode 100644 index 0000000..bd81fae Binary files /dev/null and b/apps/web/public/images/items/worn-short-sword.png differ diff --git a/tools/extract-item-icons.ps1 b/tools/extract-item-icons.ps1 new file mode 100644 index 0000000..3a836d3 --- /dev/null +++ b/tools/extract-item-icons.ps1 @@ -0,0 +1,65 @@ +# tools/extract-item-icons.ps1 +# Crops the Tier-1 item icons out of art/Items.png into apps/web/public/images/items. +# Re-runnable: overwrites its own output and touches nothing else. +$ErrorActionPreference = 'Stop' +Add-Type -AssemblyName System.Drawing + +$root = Split-Path -Parent $PSScriptRoot +$sheet = Join-Path $root 'art\Items.png' +$ratPortrait = Join-Path $root 'art\enemies\AschenratteIcon.png' +$outDir = Join-Path $root 'apps\web\public\images\items' +New-Item -ItemType Directory -Force -Path $outDir | Out-Null + +function Export-Icon { + param( + [System.Drawing.Image] $Source, + [int] $X, [int] $Y, [int] $Size, + [string] $Key + ) + $bitmap = New-Object System.Drawing.Bitmap 256, 256 + $graphics = [System.Drawing.Graphics]::FromImage($bitmap) + $graphics.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic + $graphics.DrawImage( + $Source, + (New-Object System.Drawing.Rectangle 0, 0, 256, 256), + (New-Object System.Drawing.Rectangle $X, $Y, $Size, $Size), + [System.Drawing.GraphicsUnit]::Pixel) + $graphics.Dispose() + $bitmap.Save((Join-Path $outDir "$Key.png"), [System.Drawing.Imaging.ImageFormat]::Png) + $bitmap.Dispose() + Write-Host "wrote $Key.png" +} + +$items = [System.Drawing.Image]::FromFile($sheet) +try { + # Rows 1-2: cells are 350 wide with a caption strip at the bottom, so the + # artwork is the 300x300 square inset by 25px horizontally. + $columns = 8, 366, 724, 1082 + $rowOne = 'worn-short-sword', 'bandit-blade', 'ash-blade', 'bandit-hood' + $rowTwo = 'reinforced-leather-jacket', 'raider-gloves', 'guardsman-legs', 'ash-boots' + + for ($i = 0; $i -lt 4; $i++) { + Export-Icon -Source $items -X ($columns[$i] + 25) -Y 8 -Size 300 -Key $rowOne[$i] + Export-Icon -Source $items -X ($columns[$i] + 25) -Y 364 -Size 300 -Key $rowTwo[$i] + } + + # Row 3 is centred and shorter: three cells, 262x262 artwork inset by 44px. + $rowThreeColumns = 191, 549, 907 + $rowThree = 'borderwatch-sigil', 'burned-captain-pendant', 'small-healing-potion' + for ($i = 0; $i -lt 3; $i++) { + Export-Icon -Source $items -X ($rowThreeColumns[$i] + 44) -Y 720 -Size 262 -Key $rowThree[$i] + } +} +finally { + $items.Dispose() +} + +# STAND-IN ART: no Aschenfell artwork exists yet, so the pelt icon is a scorched +# hide patch cropped from the Aschenratte portrait. Replace when real art lands. +$rat = [System.Drawing.Image]::FromFile($ratPortrait) +try { + Export-Icon -Source $rat -X 760 -Y 300 -Size 320 -Key 'ash-pelt' +} +finally { + $rat.Dispose() +}