{"id":7370,"date":"2004-03-23T02:19:23","date_gmt":"2004-03-23T00:19:23","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/2004\/03\/23\/automatic-rotation-of-images-from-digital-cameras\/"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T22:00:00","slug":"automatic-rotation-of-images-from-digital-cameras","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2004\/03\/23\/automatic-rotation-of-images-from-digital-cameras\/","title":{"rendered":"Automatic rotation of images from digital cameras"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>Some of today&#8217;s digital camera have a gravitation sensor built in. With an option in the menu, it is possible to force these cameras to note which way was the camera when the image was taken. Usually, &#8216;Orientation: &#8216; EXIF header is added to the JPEG image.  Read on to find out how you can use this information.<!--more-->There is, of course, a fast and easy way to rotate these JPEG images according to this header. Two programs are needed to do it in the most painless way possible: jhead and jpegtran. jhead can be downloaded from <a href=\"http:\/\/www.sentex.net\/~mwandel\/jhead\/\">http:\/\/www.sentex.net\/~mwandel\/jhead\/<\/a>. jpegtran is the part of most Linux distributions (package libjpeg).<\/p>\n<p>Here is the magic:<\/p>\n<div class=\"asis\"><code><br \/>\n<br \/>\n[leonid@home images]$ jhead -autorot *.jpg<br \/>\n<br \/>\n<\/code><br \/>\n\n<\/div>\n<p>This will rotate all images according to the &#8216;Orientation: &#8216; header. It will also reset the header to value &#8216;1&#8217;, so that if you accidentally run the jhead command on the same images again, it will not rotate them again.<\/p>\n<p>Note, that if you have already rotated the images with ImageMagick&#8217;s rotate or any other tool, EXIF headers might be still present and jhead will rotate images again. <\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Some of today&#8217;s digital camera have a gravitation sensor built in. With an option in the menu, it is possible to force these cameras to note which way was the camera when the image was taken. Usually, &#8216;Orientation: &#8216; EXIF header is added to the JPEG image. Read on to find out how you can &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2004\/03\/23\/automatic-rotation-of-images-from-digital-cameras\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Automatic rotation of images from digital cameras<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"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,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,62],"tags":[],"keyring_services":[],"class_list":["post-7370","post","type-post","status-publish","format-standard","hentry","category-general","category-technology"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":7972,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/09\/28\/dump_photos\/","url_meta":{"origin":7370,"position":0},"title":"dump_photos","author":"Leonid Mamchenkov","date":"September 28, 2004","format":false,"excerpt":"I am using dump_photos.pl script to copy (or move) images from my Canon EOS 300D to my computer. Canon's in-camera filesystem is not very convenient to copy files manually, because images are distributed across a number of folders (100 images per folder thing). Canon original software is for Windows only\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7981,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/09\/30\/timestamp_image\/","url_meta":{"origin":7370,"position":1},"title":"timestamp_image","author":"Leonid Mamchenkov","date":"September 30, 2004","format":false,"excerpt":"This is yet another script to deal with images from digital cameras. It will scale (resize preserving the width to height ratio) down the image to the size you've specified and annotate (write on top of the image) it with date time taken from EXIF header of the image. Font\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7941,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/09\/22\/canon-eos-1ds-mark-ii\/","url_meta":{"origin":7370,"position":2},"title":"Canon EOS 1Ds Mark II","author":"Leonid Mamchenkov","date":"September 22, 2004","format":false,"excerpt":"Digital photography is getting stronger and stronger by the day. More and more products come out that are aimed at satisfying professional photographers. Yesterday, Canon announced a new camera that should bring even more people into digital - Canon EOS-1Ds Mark II (also here). This one has a full 35mm-sized\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7364,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/03\/23\/resizing-or-rotating-a-banch-of-images\/","url_meta":{"origin":7370,"position":3},"title":"Resizing or rotating a banch of images","author":"Leonid Mamchenkov","date":"March 23, 2004","format":false,"excerpt":"It is very often that one has a need to rotate a bunch of images by 90 or 180 degrees clockwise or otherwise, or resize the same bunch of images to a certain size. Read more to learn how you can do it. First of all, you should defenetely install\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9979,"url":"https:\/\/mamchenkov.net\/wordpress\/2006\/03\/16\/some-problems-never-get-old-or-do-they\/","url_meta":{"origin":7370,"position":4},"title":"Some problems never get old.  Or do they?","author":"Leonid Mamchenkov","date":"March 16, 2006","format":false,"excerpt":"A couple of years ago I went through all our (Olga's and mine) printed photographes, selected the good ones, and ordered scans from the studio, so that I could have them all in digital form. One of the annoying problems I came across when catalogueing those images was the date.\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10804,"url":"https:\/\/mamchenkov.net\/wordpress\/2007\/08\/28\/new-theme-tour\/","url_meta":{"origin":7370,"position":5},"title":"New theme tour","author":"Leonid Mamchenkov","date":"August 28, 2007","format":false,"excerpt":"While I'm still working on the theme, I thought I'd give you a brief of overview of changes, except for the obvious visual ones. Google AdSense is gone.\u00c2\u00a0 I've been planning to do this for a long time but never got down to it.\u00c2\u00a0 I don't want to have any\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/7370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=7370"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/7370\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=7370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=7370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=7370"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=7370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}