diff --git a/scripts/msix/assets/Square150x150Logo.png b/scripts/msix/assets/Square150x150Logo.png new file mode 100644 index 0000000000..d3b5a86452 Binary files /dev/null and b/scripts/msix/assets/Square150x150Logo.png differ diff --git a/scripts/msix/assets/Square44x44Logo.png b/scripts/msix/assets/Square44x44Logo.png new file mode 100644 index 0000000000..6c61d53c2d Binary files /dev/null and b/scripts/msix/assets/Square44x44Logo.png differ diff --git a/scripts/msix/assets/Square44x44Logo.targetsize-44_altform-unplated.png b/scripts/msix/assets/Square44x44Logo.targetsize-44_altform-unplated.png new file mode 100644 index 0000000000..6c61d53c2d Binary files /dev/null and b/scripts/msix/assets/Square44x44Logo.targetsize-44_altform-unplated.png differ diff --git a/scripts/msix/assets/StoreLogo.png b/scripts/msix/assets/StoreLogo.png new file mode 100644 index 0000000000..b0d8146804 Binary files /dev/null and b/scripts/msix/assets/StoreLogo.png differ diff --git a/scripts/msix/generate_assets.ps1 b/scripts/msix/generate_assets.ps1 new file mode 100644 index 0000000000..0deee5de6c --- /dev/null +++ b/scripts/msix/generate_assets.ps1 @@ -0,0 +1,31 @@ +# Generates the MSIX package logo assets from the 192px master logo. +# Run once on Windows (re-run if the logo changes), then commit the PNGs in assets/. +# Scale-200 variants would need a >192px master; regenerate from OrcaSlicer.svg if ever needed. +$ErrorActionPreference = 'Stop' +Add-Type -AssemblyName System.Drawing + +$repoRoot = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent +$source = Join-Path $repoRoot 'resources\images\OrcaSlicer_192px.png' +$outDir = Join-Path $PSScriptRoot 'assets' +New-Item -ItemType Directory -Force $outDir | Out-Null + +$sizes = @{ + 'Square150x150Logo.png' = 150 + 'Square44x44Logo.png' = 44 + 'Square44x44Logo.targetsize-44_altform-unplated.png' = 44 + 'StoreLogo.png' = 50 +} + +$src = [System.Drawing.Image]::FromFile($source) +foreach ($name in $sizes.Keys) { + $px = $sizes[$name] + $bmp = New-Object System.Drawing.Bitmap($px, $px) + $gfx = [System.Drawing.Graphics]::FromImage($bmp) + $gfx.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic + $gfx.DrawImage($src, 0, 0, $px, $px) + $gfx.Dispose() + $bmp.Save((Join-Path $outDir $name), [System.Drawing.Imaging.ImageFormat]::Png) + $bmp.Dispose() + Write-Output "Wrote $name (${px}x${px})" +} +$src.Dispose()