sources/tech/20201215 How to Resize Images with Right Click on Linux.md
5.7 KiB
How to Resize Images with Right Click on Linux
Do you often manipulate images as part of your daily job?
I personally need to do the graphics work for this website before uploading it to my blog.
One of the most common image editing tasks is resizing, which tremendously reduces the image size from MB to KB.
This allows images to load quickly on the web even if someone uses a slow internet.
I usually use the ImageMagick tool to perform this operation from the command line.
But I recommend using the “Nautilus Image Converter” which gets integrated in the right-click context menu in the image file.
It is very handy and works well in a second. But if you want to perform this action in bulk. I would recommend using the ImageMagick tool because it comes with a batch operation.
What’s Nautilus?
Nautilus is a file manager used by GNOME and several other desktop environments. It provides a simple and integrated way to manage your files and applications.
The file manager lets you organize your files into folders. This is similar to “File Explorer” in Windows.
How to Install Nautilus Image Converter Plugin?
There are many Nautilus plugins that enhance its capabilities. They are not installed by default, but you can choose to install them according to your needs.
We are going to install a plugin called Image Manipulator,, which allows you to rotate or resize images by right-clicking on an image.
Run the command below to see if your Linux system uses Nautilus File Manager.
$ nautilus --version
GNOME nautilus 3.36.3
If you have Nautilus file manager on your system, you will get the same results as above, but the version may vary.
Make sure you already have ImageMagick installed on your system, as this plugin uses ImageMagick for image manipulation. If not, you need to install it.
Make a note: Make sure you already have “Development Tools” installed on your Linux system as a prerequisite for this.
For RHEL/CentOS 6/7 systems, use the yum command to install ImageMagick.
$ sudo yum install -y ImageMagick ImageMagick-devel
For RHEL/CentOS 8 and Fedora systems, use the dnf command to install ImageMagick.
$ sudo dnf install -y ImageMagick ImageMagick-devel
For Debian/Ubuntu systems, use the apt command or apt-get command to install ImageMagick.
$ sudo apt-get update
$ sudo apt-get install imagemagick
For openSUSE systems, use the zypper command to install ImageMagick.
$ sudo zypper install -y ImageMagick
Finally install the Nautilus plugin using the commands below.
For Ubuntu/Debian system:
$ sudo apt install nautilus-image-converter
For Fedora system:
$ sudo dnf install nautilus-image-converter
For Manjaro/ArchLinux system:
$ sudo pacman -S nautilus-image-converter
For openSUSE system:
$ sudo zypper install nautilus-image-converter
Once installed, restart Nautilus using the command below.
$ nautilus -q
How to Use Nautilus Image Converter Plugin?
You have finished the installation. Now if you right click on an image, you will see two new options in the context menu, “Resize” and “Rotate”.
When you select the resize option in the context menu, you will get a pop-up window below with some options for resizing the image.
- Select a size: Select the image size you want to resize. In the drop-down, you will get the following pixels 96×96, 128×128, 640×480, 800×600, 1024×768 or 1280×960.
- Scale: This is the compression level. By default, it comes with 50% and you can change this based on your needs. I recommend using the default value.
- Custom size: This allows you to set any custom size you want to resize the image to.
- Append: By default, it adds “.resized” to the converted image file name, which helps to retain the original image file.
- Resize in place: You can change the behavior above by selecting this option. This option replaces the original image with a modified image.
Click the “Resize” button to complete the image conversion.
via: https://www.2daygeek.com/how-to-resize-images-with-right-click-on-linux/
作者:Magesh Maruthamuthu 选题:lujun9972 译者:译者ID 校对:校对者ID