1 2 3 4 5 6 7 8 9 10 11 12 13 |
Add-Type -AssemblyName System.Drawing $file = "example2.png" $png = new-object System.Drawing.Bitmap 200,50 $font = new-object System.Drawing.Font Arial,30 $colorl = [System.Drawing.Brushes]::White $graphics = [System.Drawing.Graphics]::FromImage($png) $graphics.DrawString("Hello",$font,$colorl,5,5) $graphics.Dispose() $png.Save($file) |