From 1bad7785d0204a401a17acf8cf38f8083eccdf9a Mon Sep 17 00:00:00 2001 From: Aleksandr Neychev Date: Tue, 1 Sep 2026 11:01:45 +0500 Subject: [PATCH] add Store listing images: 9:16 poster and 300x300 logo Partner Center's screenshots and logos steps needed sizes the MSIX package doesn't produce, so they are drawn separately with the same mark. --- Packaging/Assets/Poster720x1080.png | 3 + Packaging/Assets/Square300x300Logo.png | 3 + Packaging/New-Poster.ps1 | 84 ++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 Packaging/Assets/Poster720x1080.png create mode 100644 Packaging/Assets/Square300x300Logo.png create mode 100644 Packaging/New-Poster.ps1 diff --git a/Packaging/Assets/Poster720x1080.png b/Packaging/Assets/Poster720x1080.png new file mode 100644 index 0000000..d199a16 --- /dev/null +++ b/Packaging/Assets/Poster720x1080.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:daf10d25f62720bc1caa5f21982e0015d02e1afe00254d6319016cde52f1a279 +size 9839 diff --git a/Packaging/Assets/Square300x300Logo.png b/Packaging/Assets/Square300x300Logo.png new file mode 100644 index 0000000..819b525 --- /dev/null +++ b/Packaging/Assets/Square300x300Logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9680e4ed5f8d2234e11f856c4723e133743c1b15ef469ad15aa093e1d3776d71 +size 5002 diff --git a/Packaging/New-Poster.ps1 b/Packaging/New-Poster.ps1 new file mode 100644 index 0000000..5f8f05d --- /dev/null +++ b/Packaging/New-Poster.ps1 @@ -0,0 +1,84 @@ +<# +.SYNOPSIS + Draws the Store 9:16 poster (720x1080), matching the mark drawn by + Packaging\New-Assets.ps1 (a dark plate with a white "Aя"). + +.DESCRIPTION + One-off script, not part of the packaging pipeline: this poster is a Store + listing image, uploaded by hand in Partner Center rather than shipped + inside the MSIX, so it does not belong next to the logos that build feeds + into the package. +#> +[CmdletBinding()] +param( + [string] $OutPath = (Join-Path $PSScriptRoot 'Poster720x1080.png') +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +Add-Type -AssemblyName System.Drawing + +$Width = 720 +$Height = 1080 +$Background = [System.Drawing.Color]::FromArgb(255, 0x20, 0x20, 0x20) +$Foreground = [System.Drawing.Color]::FromArgb(255, 0xFF, 0xFF, 0xFF) +$Glyph = 'Aя' + +$bitmap = New-Object System.Drawing.Bitmap($Width, $Height, [System.Drawing.Imaging.PixelFormat]::Format32bppArgb) +$graphics = [System.Drawing.Graphics]::FromImage($bitmap) + +try { + $graphics.SmoothingMode = [System.Drawing.Drawing2D.SmoothingMode]::AntiAlias + $graphics.TextRenderingHint = [System.Drawing.Text.TextRenderingHint]::AntiAliasGridFit + + # Full bleed: Partner Center masks/rounds the poster itself, so the plate + # here just fills the whole canvas rather than drawing its own corners + $graphics.Clear($Background) + + # The glyph is sized off the width, the narrower of the two dimensions, + # the same way New-Assets.ps1 sizes it off the shorter side of a square + [System.Drawing.StringFormat] $format = [System.Drawing.StringFormat]::GenericTypographic.Clone() + + try { + $target = $Width * 0.62 + $ceiling = $Height * 0.30 + $fontSize = $Width * 0.9 + $font = $null + $measured = $null + + for ($attempt = 0; $attempt -lt 20; $attempt++) { + if ($font) { $font.Dispose() } + $font = New-Object System.Drawing.Font('Segoe UI', $fontSize, [System.Drawing.FontStyle]::Bold, [System.Drawing.GraphicsUnit]::Pixel) + $measured = $graphics.MeasureString($Glyph, $font, ([System.Drawing.PointF]::new(0, 0)), $format) + + if ($measured.Width -le $target -and $measured.Height -le $ceiling) { break } + + $scale = [Math]::Min($target / $measured.Width, $ceiling / $measured.Height) + $fontSize = $fontSize * $scale * 0.98 + } + + try { + $x = [Math]::Round(($Width - $measured.Width) / 2.0) + $y = [Math]::Round(($Height - $measured.Height) / 2.0) + + $brush = New-Object System.Drawing.SolidBrush($Foreground) + $origin = New-Object System.Drawing.PointF($x, $y) + + try { $graphics.DrawString($Glyph, $font, $brush, $origin, $format) } + finally { $brush.Dispose() } + } + finally { + $font.Dispose() + } + } + finally { + $format.Dispose() + } +} +finally { + $graphics.Dispose() +} + +try { $bitmap.Save($OutPath, [System.Drawing.Imaging.ImageFormat]::Png) } finally { $bitmap.Dispose() } +Write-Host "Saved $OutPath"