0
在使用圓整函數後,我無法在PowerShell中創建位圖。有人能幫助我嗎 ?無法在整數後創建位圖
$newWidth = [Math]::Round($idealWidth * $ratioOriginal);
$bmpResized = New-Object System.Drawing.Bitmap($newWidth, 800)
我得到:Exception calling ".ctor" with "2" argument(s): "Parameter is not valid."
這將工作New-Object System.Drawing.Bitmap(800, 800)
,但我需要計算一個新的寬度。