PowerShell dot net example
Posted: Mon Mar 25, 2019 7:23 am
Hi I'm learning dot net and I was trying to test a simple PowerShell Script to draw something on a TIF. I don't get any error messages but the image is only copied and not modified.
Here's my code:
add-type -Path "C:\users\allan\desktop\GdPicture.NET.10.dll"
$GB = [GdPicture10.GdPictureImaging]::new()
$GB.SetLicenseNumber("000000000000000000000000")
$TIF = "C:\users\Allann\Desktop\x.tif"
$OUTFILE = "C:\users\Allan\Desktop\xxxxxxxxxxxxxxxxxxx.tif"
[int]$IMG
$IMG = $GB.CreateGdPictureImageFromFile($TIF)
$smting = $GB.ARGB(0,0,0,0)
$GB.DrawFilledRectangle($IMG,30,30,30,50,$SMTING,$True)
$GB.DrawText($IMG,"IT WORKED",10,100,22,0,$smting,"ARIAL",$true)
$GB.SaveAsTIFF($IMG,$OUTFILE,4)
-------------------------------------------------------------------------------------------------
I'm want to purchase the license. Could you also tell me which solution I need buy to use just the GD.....dll for writing on JPG and Tif images.
Thanks
Here's my code:
add-type -Path "C:\users\allan\desktop\GdPicture.NET.10.dll"
$GB = [GdPicture10.GdPictureImaging]::new()
$GB.SetLicenseNumber("000000000000000000000000")
$TIF = "C:\users\Allann\Desktop\x.tif"
$OUTFILE = "C:\users\Allan\Desktop\xxxxxxxxxxxxxxxxxxx.tif"
[int]$IMG
$IMG = $GB.CreateGdPictureImageFromFile($TIF)
$smting = $GB.ARGB(0,0,0,0)
$GB.DrawFilledRectangle($IMG,30,30,30,50,$SMTING,$True)
$GB.DrawText($IMG,"IT WORKED",10,100,22,0,$smting,"ARIAL",$true)
$GB.SaveAsTIFF($IMG,$OUTFILE,4)
-------------------------------------------------------------------------------------------------
I'm want to purchase the license. Could you also tell me which solution I need buy to use just the GD.....dll for writing on JPG and Tif images.
Thanks