
{"id":45522,"date":"2024-02-12T14:58:03","date_gmt":"2024-02-12T14:58:03","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=45522"},"modified":"2024-02-12T14:58:03","modified_gmt":"2024-02-12T14:58:03","slug":"rotate-images-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2024\/02\/rotate-images-ubuntu\/","title":{"rendered":"How to Rotate Images in Ubuntu 22.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/12\/gnome-photo-icon.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-43506\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/12\/gnome-photo-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/12\/gnome-photo-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/12\/gnome-photo-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/12\/gnome-photo-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/12\/gnome-photo-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/12\/gnome-photo-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>This is a beginner&#8217;s guide shows you how to rotate your images using either a Linux command or built-in apps such as file manager and image viewer.<\/p>\n<h3>Option 1: Rotate an image using built-in image viewer<\/h3>\n<p>If you want to change the orientation for only a few photo images, then the built-in image view is always the best choice.<\/p>\n<p>Simply click open your image file through the image viewer. Move mouse cursor over the app window, then you&#8217;ll see the buttons to <code>rotate to the left<\/code> and <code>rotate to the right<\/code> in bottom.<\/p>\n<p>The image viewer app varies depends on your desktop environment, the rotate options may be available other-where such as in app menu.<\/p>\n<p>After rotated your image, either click <b>Save<\/b> (Ctrl+S) to override the original image file, or choose <b>Save as<\/b> (Ctrl+Shift+S) to save the rotated image as another file.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/eog-rotate.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-45523\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/eog-rotate-700x443.webp\" alt=\"\" width=\"610\" height=\"386\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/eog-rotate-700x443.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/eog-rotate-300x190.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/eog-rotate-768x487.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/eog-rotate.webp 1015w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><br \/>\n<!--more--><\/p>\n<h3>Option 2: Rotate image\/images using File Manager<\/h3>\n<p>For the default GNOME desktop, there&#8217;s a plugin for the built-in Nautilus file manager to resize and rotate selected images.<\/p>\n<p><b>1.<\/b> First, press <code>Ctrl+Alt+T<\/code> on keyboard to open terminal. When it opens, run command to install the plugin:<\/p>\n<pre>sudo apt install nautilus-image-converter<\/pre>\n<p><i>Type user password for sudo authentication, though there&#8217;s no asterisk feedback.<\/i><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/apt-nautilus-converter-jammy.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-45524\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/apt-nautilus-converter-jammy-700x275.webp\" alt=\"\" width=\"610\" height=\"240\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/apt-nautilus-converter-jammy-700x275.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/apt-nautilus-converter-jammy-300x118.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/apt-nautilus-converter-jammy-768x302.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/apt-nautilus-converter-jammy.webp 786w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p><b>2.<\/b> After that, run command to restart Nautilus and apply the new plugin:<\/p>\n<pre>nautilus -q<\/pre>\n<p><b>3.<\/b> Now, re-open file manager and choose an image. Or, choose multiple images using either <b>Ctrl<\/b> + click to select one by one, or <b>Shift<\/b> + click to choose from one to another. Finally, right-click and select &#8220;<b>Rotate Images &#8230;<\/b>&#8221; menu option.<\/p>\n<p>In pop-up dialog, either choose an angle or input custom angle, set &#8220;Rotate in place&#8221; to override original images or use default append option to save as another files, and finally click &#8220;Rotate&#8221; button.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/nautilus-rotate-options.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-45525\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/nautilus-rotate-options-700x376.webp\" alt=\"\" width=\"610\" height=\"328\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/nautilus-rotate-options-700x376.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/nautilus-rotate-options-300x161.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/nautilus-rotate-options-768x412.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/nautilus-rotate-options.webp 956w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h3>Option 3: Linux command to rotate images<\/h3>\n<p>If you don&#8217;t have a graphical desktop environment, or previous methods do not work for you, then try <code>convert<\/code> command.<\/p>\n<p><b>1.<\/b> First open terminal (<code>Ctrl+Alt+T<\/code>) or get into command console, then run command to install the powerful imagemagick library:<\/p>\n<pre>sudo apt install imagemagick<\/pre>\n<p><b>2.<\/b> Then, use the <code>convert<\/code> command to rotate an image:<\/p>\n<pre>convert myimage.png -rotate 90 myimage-rotated.png<\/pre>\n<p>This command will rotate the &#8220;<code>myimage.png<\/code>&#8221; image file 90 degrees to the right, and save it to another &#8220;<code>myimage-rotated.png<\/code>&#8221; file. In the command, you may:<\/p>\n<ul>\n<li>Replace <code>myimage.png<\/code> with any other image file (Imagemagick supports over 100 major file formats), though you may first navigate to the folder that contains your photo images. For example, use <code>cd ~\/Pictures<\/code> to navigate to user Pictures folder, or right-click on picture folder and select &#8220;Open in Terminal&#8221;.<\/li>\n<li>Set another rotate degree (from 0 to 360) in clockwise direction.<\/li>\n<li>For choice, set the output image name (<code>myimage-rotated.png<\/code> in last command) to same to the input image (<code>myimage.png<\/code>), so it will override the original one.<\/li>\n<\/ul>\n<p>For batch image rotating, for example rotate all <code>.png<\/code> images (in current folder) 90 degrees to the right, and append <code>-rotated<\/code> in output filenames, run command:<\/p>\n<pre>for img in *.png; do convert $img -rotate 90 ${img%.png}-rotated.png; done<\/pre>\n<h3>In Addition<\/h3>\n<p>In addition to the options above, there&#8217;s also Shotwell photo manager (<i>pre-installed in full installation mode<\/i>), gThumb image organizer can do similar jobs. For more powerful image converting tool, but hate Linux commands, then <a href=\"https:\/\/converseen.fasterland.net\/\" target=\"_blank\" rel=\"noopener\">converseen<\/a> is a good choice.<\/p>","protected":false},"excerpt":{"rendered":"<p>This is a beginner&#8217;s guide shows you how to rotate your images using either a Linux command or built-in apps such as file manager and image viewer. Option 1: Rotate an image using built-in image viewer If you want to change the orientation for only a few photo images, then the built-in image view is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":43506,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[2148,2149],"class_list":["post-45522","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-image-editing","tag-imagemagick"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/45522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=45522"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/45522\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/43506"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=45522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=45522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=45522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}