- 293 名前:名称未設定 mailto:sage [2009/01/13(火) 22:47:12 ID:v0LdsXek0]
- phpで書いてみたというか他のソースのコピペだけどバックスラッシュ地獄になってしまった
10.5で特にphpをいじった記憶は無いのでOS標準状態で行ける気がするが詳細は不明。 自分で撮った対応画像が無いのであってるかよくわかりませんがネットで拾った画像ではそれっぽかった。 set theFile to "/Users/hoge/Desktop/Download/geotag1.jpg" -- www.google.com/codesearch/p?hl=ja#jDlm4b6TORk/map/mapItemEdit.inc&q=GPSLongitude%20exif_read_data set theGPSData to do shell script "php -r ' @$exif = exif_read_data($argv[1], 0,true); if (!empty($exif)){ foreach ($exif as $key => $section) { if ($key ==\"GPS\") { $deg = explode(\"/\",$section[\"GPSLatitude\"][0]); $min = explode(\"/\",$section[\"GPSLatitude\"][1]); $sec = explode(\"/\",$section[\"GPSLatitude\"][2]); $Glatitude = $deg[0]/$deg[1] + ($min[0]/$min[1])/60 + ($sec[0]/$sec[1])/3600; $Glatitude = ($section[\"GPSLatitudeRef\"]==\"N\") ? $Glatitude:-$Glatitude; $deg = explode(\"/\",$section[\"GPSLongitude\"][0]); $min = explode(\"/\",$section[\"GPSLongitude\"][1]); $sec = explode(\"/\",$section[\"GPSLongitude\"][2]); $Glongitude = $deg[0]/$deg[1] + ($min[0]/$min[1])/60 + ($sec[0]/$sec[1])/3600; $Glongitude = ($section[\"GPSLongitudeRef\"]==\"E\") ? $Glongitude:-$Glongitude; echo \"$Glatitude,$Glongitude\"; } } } ' " & quoted form of theFile if theGPSData is not "" then set gpsUrl to "maps.google.com/?q=" & theGPSData & "&spn=0.05,0.05&t=h&om=1&hl=jp" open location gpsUrl else beep end if
|

|