Closed
Description
When I try to use a custom png I get this error, are there requirements or something I'm missing?
New-Object: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:390
Line |
390 | … $OldImage = New-Object -TypeName System.Drawing.Bitmap -ArgumentList …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling ".ctor" with "1" argument(s): "Parameter is not valid."
RuntimeException: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:391
Line |
391 | $ROWS = $OldImage.Height / $OldImage.Width * $COLUMNS
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Attempted to divide by zero.
New-Object: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:394
Line |
394 | … $Bitmap = New-Object -TypeName System.Drawing.Bitmap -ArgumentList …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling ".ctor" with "2" argument(s): "Parameter is not valid."
MethodInvocationException: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:395
Line |
395 | $NewImage = [System.Drawing.Graphics]::FromImage($Bitmap)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "FromImage" with "1" argument(s): "Value cannot be
| null. (Parameter 'image')"
InvalidOperation: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:396
Line |
396 | … OldImage, $(New-Object -TypeName System.Drawing.Rectangle -ArgumentLi …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
InvalidOperation: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:415
Line |
415 | $Bitmap.Dispose()
| ~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
InvalidOperation: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:416
Line |
416 | $NewImage.Dispose()
| ~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
InvalidOperation: C:\Users\Tom\scoop\apps\winfetch\current\winfetch.ps1:417
Line |
417 | $OldImage.Dispose()
| ~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
Metadata
Assignees
Labels
No labels
Activity