{"id":27,"date":"2019-10-02T22:26:12","date_gmt":"2019-10-03T02:26:12","guid":{"rendered":"http:\/\/iheinrich.com\/?p=27"},"modified":"2019-10-03T11:47:35","modified_gmt":"2019-10-03T15:47:35","slug":"nef-images-with-the-sorting-script","status":"publish","type":"post","link":"https:\/\/iheinrich.com\/index.php\/2019\/10\/02\/nef-images-with-the-sorting-script\/","title":{"rendered":"NEF images with the Sorting Script"},"content":{"rendered":"\n<p>I was pretty happy with my scanning and sorting script.<\/p>\n\n\n\n<p>I shoot with a Nikon camera, so many of my images are NEF\/RAW images.<\/p>\n\n\n\n<p>Unfortunately, the exifr method JPEG.new doesn\u2019t like NEF images, because they aren\u2019t JPEGS.<\/p>\n\n\n\n<p>Maybe they are TIFFs? Let\u2019s give it a try!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nif file.end_with?(\".NEF\")\n     dateShot = EXIFR::TIFF.new(\"#{file}\").date_time\n     puts \"it's a NEF\"\nelse\n     dateShot = EXIFR::JPEG.new(\"#{file}\").date_time\nend<\/code><\/pre>\n\n\n\n<p>so we replace the one line that extracts date with this \u201cNEF checker\u201d and it works!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was pretty happy with my scanning and sorting script. I shoot with a Nikon camera, so many of my&#8230;<\/p>\n","protected":false},"author":1,"featured_media":28,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-27","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby","wpcat-5-id"],"_links":{"self":[{"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":1,"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/posts\/27\/revisions\/29"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/media\/28"}],"wp:attachment":[{"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iheinrich.com\/index.php\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}