-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-icon.ps1
More file actions
28 lines (20 loc) · 773 Bytes
/
create-icon.ps1
File metadata and controls
28 lines (20 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Add-Type -AssemblyName System.Drawing
# Create a 512x512 bitmap
$bitmap = New-Object System.Drawing.Bitmap(512, 512)
$graphics = [System.Drawing.Graphics]::FromImage($bitmap)
# Set background color to blue
$graphics.Clear([System.Drawing.Color]::FromArgb(64, 128, 255))
# Create font and brush for text
$font = New-Object System.Drawing.Font("Arial", 120, [System.Drawing.FontStyle]::Bold)
$brush = New-Object System.Drawing.SolidBrush([System.Drawing.Color]::White)
# Draw "APM" text
$graphics.DrawString("APM", $font, $brush, 100, 200)
# Clean up graphics
$graphics.Dispose()
# Save as PNG
$bitmap.Save("app-icon.png", [System.Drawing.Imaging.ImageFormat]::Png)
# Clean up
$bitmap.Dispose()
$font.Dispose()
$brush.Dispose()
Write-Host "Icon created successfully!"