画像判定
set strFilePath to "/System/Library/Desktop Pictures/Big Sur Graphic.heic"
set strCommandText to "/usr/bin/xxd -p -l 2 \"" & strFilePath & "\""
set strResponse to do shell script strCommandText
if strResponse is "5249" then
log "たぶんWEBP"
else if strResponse is "8950" then
log "たぶんPNG"
else if strResponse is "ffd8" then
log "たぶんJPG"
else if strResponse is "4749" then
log "たぶんGIF"
else if strResponse is "0000" then
log "たぶんheic"
else
log "不明"
end if
| 固定リンク
「webp」カテゴリの記事
- [ffmpeg]ムービーファイルをアニメーションwebpにする(2023.12.06)
- [anim_dump] アニメーションWEBPファイルから各フレームイメージを書き出す(フレームイメージ)(2024.01.08)
- [webpmux] アニメーションWEBPファイルから各フレームイメージを書き出す(2023.12.20)
- [applescript]libwebpインストール(2024.01.07)
- [bash]libwebpインストール(2024.01.08)