{"id":117231,"date":"2023-12-27T09:07:04","date_gmt":"2023-12-27T00:07:04","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=117231"},"modified":"2023-12-27T09:07:04","modified_gmt":"2023-12-27T00:07:04","slug":"how-to-check-jpeg-exif-info","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/how-to-check-jpeg-exif-info\/","title":{"rendered":"JPEG\u753b\u50cf\u306b\u4f4d\u7f6e\u60c5\u5831\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u4e00\u62ec\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2023\/12\/s_20231226_114546.jpg\" alt=\"S 20231226 114546\" title=\"s_20231226_114546.jpg\" border=\"0\" width=\"1278\" height=\"799\" \/><\/p>\n<p>JPEG\u753b\u50cf\u306b\u306f\u4f4d\u7f6e\u60c5\u5831\u3092\u542b\u3081\u305f\u3055\u307e\u3056\u307e\u306a\u60c5\u5831\u3092EXIF\u60c5\u5831\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5199\u771f\u3092\u64ae\u5f71\u3057\u305f\u5834\u6240\u3084\u3001\u64ae\u5f71\u6642\u306e\u30ab\u30e1\u30e9\u306e\u8a2d\u5b9a\u306a\u3069\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u4fbf\u5229\u306a\u6a5f\u80fd\u3067\u3059\u304c\u3001\u4f4d\u7f6e\u60c5\u5831\u304c\u57cb\u3081\u8fbc\u307e\u308c\u305f\u307e\u307e\u306e\u5199\u771f\u3092\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u516c\u958b\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u516c\u958b\u3057\u305f\u5199\u771f\u3092\u5143\u306b\u81ea\u5b85\u3084\u8077\u5834\u306e\u5834\u6240\u304c\u3070\u308c\u3066\u3057\u307e\u3046\u5371\u967a\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u4f4d\u7f6e\u60c5\u5831\u304cJPEG\u753b\u50cf\u306b\u57cb\u3081\u8fbc\u307e\u308c\u3066\u3044\u306a\u3044\u304b\u3069\u3046\u304b\u3092\u4e00\u62ec\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>jhead\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528<\/h2>\n<p>JPEG\u306eEXIF\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u305f\u308a\u524a\u9664\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308bjhead\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002jhead\u30b3\u30de\u30f3\u30c9\u306f\u5404\u7a2e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb(macOS\u306e\u5834\u5408Homebrew\u3084MacPorts)\u3092\u5229\u7528\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>jhead\u306f\u300cjhead \u753b\u50cf\u30d5\u30a1\u30a4\u30eb.jpg\u300d\u3068\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067EXIF\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\n$ jhead DSCN0010.jpg\r\nFile name    : DSCN0010.jpg\r\nFile size    : 161713 bytes\r\nFile date    : 2022:11:09 15:15:17\r\nCamera make  : NIKON\r\nCamera model : COOLPIX P6000\r\nDate\/Time    : 2008:10:22 16:28:39\r\nResolution   : 640 x 480\r\nFlash used   : No\r\nFocal length : 24.0mm  (35mm equivalent: 112mm)\r\nExposure time: 0.013 s  (1\/75)\r\nAperture     : f\/5.9\r\nISO equiv.   : 64\r\nWhitebalance : Auto\r\nMetering Mode: pattern\r\nExposure     : program (auto)\r\nGPS Latitude : N 43d 28m  2.814000s\r\nGPS Longitude: E 11d 53m  6.456000s\r\nGPS Altitude :\r\nJPEG Quality : 84\r\n<\/pre>\n<p>\u7d50\u679c\u306b\u300cGPS Latitude\u300d\u3084\u300cGPS Longitude\u300d\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3068\u4f4d\u7f6e\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>jhead\u306f\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u3066\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u62ec\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c(jhead *.jpg\u7b49)\u3001\u305d\u306e\u307e\u307e\u3067\u306f\u4f4d\u7f6e\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3059\u308b\u306e\u306b\u4e0d\u4fbf\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067jhead\u3092\u30e9\u30c3\u30d7\u3059\u308b\u30b7\u30f3\u30d7\u30eb\u306aRuby\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f(\u30a8\u30e9\u30fc\u30c1\u30a7\u30c3\u30af\u306a\u3069\u7701\u3044\u3066\u3044\u308b\u7c21\u6613\u7684\u306a\u3082\u306e\u3067\u3059\u3002\u6539\u9020\u3057\u3066\u4f7f\u3044\u3084\u3059\u304f\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059)\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-ruby\" data-lang=\"Ruby\"><code>require 'find'\r\n\r\nclass ExifChecker\r\n  def initialize\r\n    @printall = false\r\n  end\r\n\r\n  def check(path)\r\n    Find.find(path) do |f|\r\n      if f =~ \/\\.(jpg|jpeg)$\/i\r\n        msg = \"OK\"\r\n        result = `jhead '#{f}'`\r\n        begin\r\n          result.each_line do |line|\r\n            if line =~ \/^GPS Latitude\/ || line =~ \/^GPS Longitude\/\r\n              msg = \"NG: #{line}\"\r\n            end\r\n          end\r\n        rescue => e\r\n          puts e.message\r\n        end\r\n        if @printall || msg =~ \/^NG\/\r\n          puts \"#{f} #{msg}\"\r\n        end\r\n      end\r\n    end\r\n  end\r\n\r\nend\r\n\r\nexif = ExifChecker.new\r\nexif.check(ARGV[0])<\/code><\/pre>\n<\/div>\n<p>\u6307\u5b9a\u3055\u308c\u305f\u30d5\u30a9\u30eb\u30c0\u3092\u518d\u5e30\u7684\u306b\u305f\u3069\u308a\u3001\u898b\u3064\u304b\u3063\u305fJPEG\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306b\u4f4d\u7f6e\u60c5\u5831\u304c\u5b58\u5728\u3059\u308c\u3070\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u8868\u793a\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>exifchecker.rb\u3068\u3057\u3066\u4fdd\u5b58\u3057\u300cruby exifchecker.rb \u753b\u50cf\u30d5\u30a9\u30eb\u30c0\u300d\u3068\u5b9f\u884c\u3057\u307e\u3059\u3002\u4eca\u56de\u30c6\u30b9\u30c8\u7528\u306bGitHub\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b<a href=\"https:\/\/github.com\/ianare\/exif-samples\">Exif Samples<\/a>\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre>\r\n$ ruby exifchecker.rb ~\/evaluate\/exif-samples\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/Canon_40D.jpg NG: GPS Longitude: ? ?\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/Kodak_CX7530.jpg NG: GPS Longitude: E 36d  3.385m  0s\r\nHeader missing JFIF marker\r\nHeader missing JFIF marker\r\nHeader missing JFIF marker\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0010.jpg NG: GPS Longitude: E 11d 53m  6.456000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0012.jpg NG: GPS Longitude: E 11d 53m  7.422000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0021.jpg NG: GPS Longitude: E 11d 53m  4.338000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0025.jpg NG: GPS Longitude: E 11d 52m 53.886000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0027.jpg NG: GPS Longitude: E 11d 52m 53.454000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0029.jpg NG: GPS Longitude: E 11d 52m 48.618000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0038.jpg NG: GPS Longitude: E 11d 52m 45.168000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0040.jpg NG: GPS Longitude: E 11d 52m 44.802000s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/gps\/DSCN0042.jpg NG: GPS Longitude: E 11d 52m 53.322s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/hdr\/canon_hdr_NO.jpg NG: GPS Longitude: ? ?\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/hdr\/canon_hdr_YES.jpg NG: GPS Longitude: ? ?\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/hdr\/iphone_hdr_NO.jpg NG: GPS Longitude: W  3d 43m 29.11s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/hdr\/iphone_hdr_YES.jpg NG: GPS Longitude: W  3d 43m 29.11s\r\n\r\nNonfatal Error : '\/Users\/sora\/evaluate\/exif-samples\/jpg\/tests\/30-type_error.jpg' Illegal Exif or interop ofset directory link\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/tests\/32-lens_data.jpeg NG: GPS Longitude: ? ?\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/tests\/45-gps_ifd.jpg NG: GPS Longitude: ? ?\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/tests\/46_UnicodeEncodeError.jpg NG: GPS Longitude: W  0d 40.4137m  0s\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/tests\/67-0_length_string.jpg NG: GPS Longitude: E  7d 35m 31.00s\r\n\r\nNonfatal Error : '\/Users\/sora\/evaluate\/exif-samples\/jpg\/tests\/87_OSError.jpg' Suspicious offset of first Exif IFD value\r\n\/Users\/sora\/evaluate\/exif-samples\/jpg\/tests\/87_OSError.jpg NG: GPS Longitude: E 11d 14.077166m  0s\r\n<\/pre>\n<p>\u30a8\u30e9\u30fc\u304c\u3067\u3066\u3044\u308b\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3082\u3042\u308a\u307e\u3059\u304c\u3001\/jpg\/gps\u4ee5\u4e0b\u306e\u4f4d\u7f6e\u60c5\u5831\u304c\u57cb\u3081\u8fbc\u307e\u308c\u3066\u3044\u308b\u3067\u3042\u308d\u3046\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u51fa\u3067\u304d\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001jhead\u3067\u4f4d\u7f6e\u60c5\u5831\u3092\u524a\u9664\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u3001\u305d\u306e\u5834\u5408\"-purejpg\"\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u3066\u3001\u300cjhead -purejpg DSCN0010.jpg\u300d\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>JPEG\u753b\u50cf\u306b\u4f4d\u7f6e\u60c5\u5831\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u4e00\u62ec\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002EXIF\u60c5\u5831\u306fMac\u306eFinder\u306a\u3069\u304b\u3089\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u753b\u50cf\u304c\u5927\u91cf\u306b\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u624b\u9593\u304c\u304b\u304b\u308a\u3059\u304e\u307e\u3059\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u30d0\u30c3\u30c1\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u6e96\u5099\u3057\u3066\u304a\u304f\u306e\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JPEG\u753b\u50cf\u306b\u306f\u4f4d\u7f6e\u60c5\u5831\u3092\u542b\u3081\u305f\u3055\u307e\u3056\u307e\u306a\u60c5\u5831\u3092EXIF\u60c5\u5831\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u5199\u771f\u3092\u64ae\u5f71\u3057\u305f\u5834\u6240\u3084\u3001\u64ae\u5f71\u6642\u306e\u30ab\u30e1\u30e9\u306e\u8a2d\u5b9a\u306a\u3069\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u4fbf\u5229\u306a\u6a5f\u80fd\u3067\u3059\u304c\u3001\u4f4d\u7f6e\u60c5\u5831\u304c\u57cb\u3081\u8fbc\u307e\u308c\u305f\u307e\u307e\u306e\u5199\u771f\u3092\u30a4\u30f3\u30bf\u30fc [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":117242,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[2047],"tags":[1255],"class_list":["post-117231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","tag-exif"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/117231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=117231"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/117231\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/117242"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=117231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=117231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=117231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}