xah talk show 2025-04-01 31834
xah talk show 2025-04-01 318a6
xah talk show 2025-04-01 31903
# Path to your photo file
$photoPath = "C:\path\to\your\image.jpg"# Load the image
Add-Type -AssemblyName System.Drawing
$image = [System.Drawing.Image]::FromFile($photoPath)
# EXIF Property ID for DateTimeOriginal (36867 or 0x9003)
$propertyId = 36867
# Get the property item
try {
$propertyItem = $image.GetPropertyItem($propertyId)
# The value is stored as an ASCII string in the EXIF data
$dateTimeBytes = $propertyItem.Value
$dateTimeString = [System.Text.Encoding]::ASCII.GetString($dateTimeBytes).Trim([char]0)
Write-Output"DateTimeOriginal: $dateTimeString"
} catch {
Write-Output"DateTimeOriginal not found or an error occurred: $_"
}
# Clean up
$image.Dispose()