Something went wrong. Try again.
A simple, small calculator placed discreetly near the Windows Taskbar or anywhere on the screen taskbar-calculator.marcomaroni.it
Something went wrong. Try again.
974 B · 21 lines
at main
12345678910111213141516171819202122# Generates the MSIX PNG logo assets from icon1.ico.Add-Type -AssemblyName System.Drawing$root = Split-Path $PSScriptRoot -Parent$icoPath = Join-Path $root "icon1.ico"$assets = $PSScriptRoot + "\Assets"if (-not (Test-Path $assets)) { New-Item -ItemType Directory -Path $assets | Out-Null }
function Save-Png([int]$size, [string]$name) { $ico = New-Object System.Drawing.Icon($icoPath, $size, $size) $bmp = New-Object System.Drawing.Bitmap($size, $size) $g = [System.Drawing.Graphics]::FromImage($bmp) $g.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic $g.DrawIcon($ico, (New-Object System.Drawing.Rectangle(0, 0, $size, $size))) $bmp.Save((Join-Path $assets $name), [System.Drawing.Imaging.ImageFormat]::Png) $g.Dispose(); $bmp.Dispose(); $ico.Dispose() Write-Host "wrote $name ($size x $size)"}
Save-Png 50 "StoreLogo.png"Save-Png 150 "Square150x150Logo.png"Save-Png 44 "Square44x44Logo.png"