How save the img from "[void][Reflection.Assembly] ....... "

Copper Contributor

Hello, pls how i save the image from .....

the scripte:

 

[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[void][Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$frmMain = New-Object Windows.Forms.Form
$xString = @(`

 

)
$imageBytes = [System.Convert]::FromBase64String($xString)
$ms = [System.IO.MemoryStream]::new($imageBytes, 0, $imageBytes.Length)
$ms.Write($imageBytes, 0, $imageBytes.Length)
$pic = [System.Drawing.Image]::FromStream($ms, $true)
$picArea = New-Object Windows.Forms.PictureBox
$picArea.Dock = "Fill"
$picArea.Image = $pic
$picArea.SizeMode = "StretchImage"
$frmMain.Controls.AddRange(@($picArea))
[void]$frmMain.ShowDialog()

 

Thank for your help

Arnold

 

0 Replies