PowerShell/Windows PowerShell用、ExifタグおよびSystemDrawing.Imageタグの列挙値(enum)定義
Enum definitions for Exif and SystemDrawing.Image tags for PowerShell/Windows PowerShell.
ドットソースでファイルを読み込む / Read files with dot source.
. ./EXIFTags.ps1
. ./GDIPImageTags.ps1
. ./Ptype.ps1
. ./PrintValue.ps1
PowerShell(pwsh.exe)の場合。System.Drawing.Bitmapからプロパティを取得 / Get Property from System.Drawing.Bitmap in PowerShell(pwsh.exe)
$x=New-Object System.Drawing.Bitmap(<Full path of picture>)
$x.PropertyItems | sort id | select @{Name="IdHex";Expression={$_.id.ToString("X4")}},@{Name="TagName"; Expression={[EXIFTags]$_.Id }} ,@{Name="Val"; Expression={[Ptype]$_.Type}},Value, @{Name="Vdisp"; Expression={printvalue $_.Type $_.Value}} | ft
Windows PowerShellでは、Add-Typeが必要になります。 / Windows PowerShell requires 'Add-Type'.
add-type -AssemblyName system.Drawing
$x=New-Object System.Drawing.Bitmap(<Full path of picture>)
$x.PropertyItems | sort id | select @{Name="IdHex";Expression={$_.id.ToString("X4")}},@{Name="TagName"; Expression={[EXIFTags]$_.Id }} ,@{Name="Val"; Expression={[Ptype]$_.Type}},Value, @{Name="Vdisp"; Expression={printvalue $_.Type $_.Value}} | ft
Source Infomation
CIPA DC-008-2023
デジタルスチルカメラ用画像ファイルフォーマット規格 Exif 3.0
Exchangeable image file format for digital still cameras: Exif Version 3.0
https://www.cipa.jp/std/documents/download_j.html?CIPA_DC-X008-2023_J
Source Infomation
Windows kit Gdiplusimaging.h SDK Ver.10.0.22621.0(2024/06/26)
https://learn.microsoft.com/ja-jp/windows/win32/gdiplus/-gdiplus-constant-image-property-tag-constants?redirectedfrom=MSDN https://learn.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-constant-image-property-tag-constants?redirectedfrom=MSDN