Xah Talk Show 2025-04-01 Ep639 emacs lisp html make citation, extract photo taken date in image file

make citation

extract date in image file, and rename in file

xah talk show 2025-04-01 31834
xah talk show 2025-04-01 31834
xah talk show 2025-04-01 318a6
xah talk show 2025-04-01 318a6
xah talk show 2025-04-01 31903
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()
exiftool -DateTimeOriginal image.jpg
BEM SMACSS CUBE CSS 2025-04-01 2a2c2
BEM SMACSS CUBE CSS 2025-04-01 2a2c2