image-properties.ps1 337 B

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