Change Orientation of NEF Files in EXIF Data: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Use `exiftool` on the command line to edit EXIF data of NEF files to control their orientation. <pre> $ exiftool -orientation#=1 [myfile.NEF] </pre> {| |+'''Orientation Valu...") |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 24: | Line 24: | ||
|8 ||Rotate 270 CW | |8 ||Rotate 270 CW | ||
|} | |} | ||
<p class="alert alert-warning">The orientation is relative to the files original orientation, so for example applying a 90 CW rotation 3 times will leave the file rotated 90 degrees, not 270 degrees.</p> | |||
An alternate method: | |||
<pre> | |||
$ exiftool -orientation="Rotate 90 CW" myfile.NEF | |||
</pre> | |||
`orientation` values: | |||
Rotate 90 CW<br /> | |||
Rotate 180 CW<br /> | |||
Rotate 270 CW | |||
<p class="alert alert-warning">Note that [[Command Line Image Tools|`sips` can also be used]] to rotate images.</p> | |||
<syntaxhighlight lang="zsh"> | |||
sips -r 90 path/to/file.jpg --out rotatedfile.jpg | |||
</syntaxhighlight> | |||
== See also == | |||
* [[Command Line Image Tools]] | |||
Latest revision as of 14:37, 21 January 2025
Use exiftool on the command line to edit EXIF data of NEF files to control their orientation.
$ exiftool -orientation#=1 [myfile.NEF]
| 1 | Horizontal (normal) |
| 2 | Mirror horizontal |
| 3 | Rotate 180 |
| 4 | Mirror vertical |
| 5 | Mirror horizontal and rotate 270 CW |
| 6 | Rotate 90 CW |
| 7 | Mirror horizontal and rotate 90 CW |
| 8 | Rotate 270 CW |
The orientation is relative to the files original orientation, so for example applying a 90 CW rotation 3 times will leave the file rotated 90 degrees, not 270 degrees.
An alternate method:
$ exiftool -orientation="Rotate 90 CW" myfile.NEF
orientation values:
Rotate 90 CW
Rotate 180 CW
Rotate 270 CW
Note that sips can also be used to rotate images.
sips -r 90 path/to/file.jpg --out rotatedfile.jpg