Toastie 4 months ago
parent
commit
1def36916b
1 changed files with 8 additions and 0 deletions
  1. 8 0
      microsoft/powershell/image-properties.ps1

+ 8 - 0
microsoft/powershell/image-properties.ps1

@@ -0,0 +1,8 @@
+$imageFile = <full path>
+Add-Type -AssemblyName System.Drawing
+$image = New-Object System.Drawing.Bitmap $imageFile
+$imageWidth = $image.Width
+$imageHeight = $image.Height
+$imageColors = $image.PixelFormat
+$imageFormat = $image.RawFormat
+# https://docs.microsoft.com/en-us/previous-versions/windows/desktop/wiaaut/-wiaaut-consts-formatid