File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket.
99
1010For a steady stream of TILs, [ sign up for my newsletter] ( https://tinyletter.com/jbranchaud ) .
1111
12- _ 893 TILs and counting..._
12+ _ 894 TILs and counting..._
1313
1414---
1515
@@ -1016,6 +1016,7 @@ _893 TILs and counting..._
10161016- [ Import A Github Project Into CodeSandbox] ( workflow/import-a-github-project-into-codesandbox.md )
10171017- [ Interactively Kill A Process With fkill] ( workflow/interactively-kill-a-process-with-fkill.md )
10181018- [ Open Slack's Keyboard Shortcuts Reference Panel] ( workflow/open-slacks-keyboard-shortcuts-reference-panel.md )
1019+ - [ Rotate An Image To Be Oriented Upright] ( workflow/rotate-an-image-to-be-oriented-upright.md )
10191020- [ Set Recurring Reminders In Slack] ( workflow/set-recurring-reminders-in-slack.md )
10201021- [ Toggle Between Stories In Storybook] ( workflow/toggle-between-stories-in-storybook.md )
10211022
Original file line number Diff line number Diff line change 1+ # Rotate An Image To Be Oriented Upright
2+
3+ Many programs that display JPEG images will read the EXIF data for
4+ 'Orientation' headers so that they can correctly display the image. Not all of
5+ them though. For instance, when a browser renders an ` <img> ` tag for such a
6+ JPEG image, it won't account for the 'Orientation' header and you might end up
7+ with a sideways image.
8+
9+ You can normalize the orientation with the
10+ [ ` jhead ` ] ( https://www.sentex.ca/~mwandel/jhead/usage.html ) utility which uses
11+ [ ` jpegtran ` ] ( https://linux.die.net/man/1/jpegtran ) under the hood. This is done
12+ with the ` -autorot ` flag.
13+
14+ ``` bash
15+ $ jhead -autorot my_image.jpeg
16+ ```
17+
18+ > Using the 'Orientation' tag of the Exif header, rotate the image so that it
19+ > is upright. The program 'jpegtran' is used to perform the rotation. After
20+ > rotation, the orientation tag of the Exif header is set to '1' (normal
21+ > orientation). The Exif thumbnail is also rotated.
22+
23+ > This feature is especially useful with newer digital cameras [ and
24+ > smartphones] , which set the orientation field in the Exif header
25+ > automatically using a built in orientation sensor in the camera.
26+
27+ The image will now be upright in all programs.
You can’t perform that action at this time.
0 commit comments