« パッケージを解凍する | トップページ | Acrobatで文字入力 »

画像判定

【スクリプトエディタで開く】


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


|

« パッケージを解凍する | トップページ | Acrobatで文字入力 »

webp」カテゴリの記事