mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
Merge pull request #20438 from lujun9972/add-MjAyMDEyMTUgSG93IHRvIFJlc2l6ZSBJbWFnZXMgd2l0aCBSaWdodCBDbGljayBvbiBMaW51eC5tZAo=
自动选题[tech]: 20201215 How to Resize Images with Right Click on Linux
This commit is contained in:
commit
4b07182e4f
@ -0,0 +1,73 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What web developers love about the Brackets text editor)
|
||||
[#]: via: (https://opensource.com/article/20/12/brackets)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
What web developers love about the Brackets text editor
|
||||
======
|
||||
This basic editor is geared toward web developers, supporting multiple
|
||||
programming languages and offering plenty of extensions to make it your
|
||||
own.
|
||||
![Text editor on a browser, in blue][1]
|
||||
|
||||
The Brackets text editor is an editor geared primarily at web developers. Appropriately, its Edit menu is full of functions especially useful to users of web programming languages, with a focus on the classic combination of HTML, CSS, and Javascript.
|
||||
|
||||
However, it supports many languages and formats relevant to the internet, including XML, Markdown, YAML and JSON, PHP, Lua, Java, and Python, as well as some common general languages like C, C++, and even the output of `diff` commands.
|
||||
|
||||
### Installing Brackets
|
||||
|
||||
Brackets can be installed on Linux, Windows, and macOS from the [Brackets website][2].
|
||||
|
||||
Alternatively, on Linux, you can install it as a Flatpak from [flathub.org][3].
|
||||
|
||||
![Brackets editor][4]
|
||||
|
||||
### Using Brackets
|
||||
|
||||
For the most part, Brackets is a "normal" text editor, with features similar to jEdit or Medit. There’s syntax highlighting, configurable tab spacing, character encoding settings, and so on. These are available in the status bar at the bottom of the window.
|
||||
|
||||
From the View menu, there are theme settings, line numbering, word wrapping, and even options to split the window so you can see two files in one window.
|
||||
|
||||
In the Edit menu, however, there are some special functions for programming. Here are some of my favorites:
|
||||
|
||||
* Indent and unindent blocks of text using the **Ctrl+[** or **Ctrl+]** keyboard shortcuts, which are useful not only for keeping HTML, CSS, and Javascript tidy but essential for Python code.
|
||||
* Make a line into a comment with **Ctrl+/**. The way Brackets marks a comment depends on the language you’re using, so this function works whether your document uses slashes, dashes, arrows, hashes, or anything else for commenting.
|
||||
* Move a line up or down in your document with **Shift+Ctrl+Up** or **Shift+Ctrl+Down**.
|
||||
* Delete an entire line with **Shift+Ctrl+D**.
|
||||
* Duplicate a line with **Ctrl+D**.
|
||||
|
||||
|
||||
|
||||
These are all seemingly niche functions you might not think you’ll use often, but once you have them, you come to rely on them.
|
||||
|
||||
### Extensions
|
||||
|
||||
Brackets can also accept extensions so you and other coders can add to its features. To see what extensions are available, click the File menu and select Extension Manager. There’s a wide variety of extensions available, including Beautify to adjust code formatting, multiple support kits for additional languages, a function to go to the beginning or end of a tag, and much more.
|
||||
|
||||
Extensions can make all the difference to an editor and whether it’s right for you, so if you try Brackets and enjoy everything about it, but you’re missing some vital feature, have a browse through the available extensions before you give up on it.
|
||||
|
||||
### Try Brackets
|
||||
|
||||
Brackets is a somewhat subdued editor. While it advertises itself as a "code editor for the web," it’s actually a nice general-purpose editor with some extra features thrown in for common web toolchains. If you like the look of Brackets and what it has to offer, give it a try!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/brackets
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue)
|
||||
[2]: http://brackets.io/
|
||||
[3]: https://flathub.org/apps/details/io.brackets.Brackets
|
||||
[4]: https://opensource.com/sites/default/files/screenshot_2020-12-02_at_16.26.58.png (Brackets editor)
|
@ -0,0 +1,149 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Resize Images with Right Click on Linux)
|
||||
[#]: via: (https://www.2daygeek.com/how-to-resize-images-with-right-click-on-linux/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
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][1]** 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][2]**” installed on your Linux system as a prerequisite for this.
|
||||
|
||||
For **RHEL/CentOS 6/7** systems, use the **[yum command][3]** to install ImageMagick.
|
||||
|
||||
```
|
||||
$ sudo yum install -y ImageMagick ImageMagick-devel
|
||||
```
|
||||
|
||||
For **RHEL/CentOS 8** and **Fedora** systems, use the **[dnf command][4]** to install ImageMagick.
|
||||
|
||||
```
|
||||
$ sudo dnf install -y ImageMagick ImageMagick-devel
|
||||
```
|
||||
|
||||
For **Debian/Ubuntu** systems, use the **[apt command][5]** or **[apt-get command][6]** to install ImageMagick.
|
||||
|
||||
```
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install imagemagick
|
||||
```
|
||||
|
||||
For **openSUSE** systems, use the **[zypper command][7]** 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”**.
|
||||
|
||||
![][8]
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
![][8]
|
||||
|
||||
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][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.2daygeek.com/author/magesh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.2daygeek.com/resize-convert-images-from-linux-command-line/
|
||||
[2]: https://www.2daygeek.com/install-development-tools-on-ubuntu-debian-arch-linux-mint-fedora-centos-rhel-opensuse/
|
||||
[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/
|
||||
[4]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/
|
||||
[5]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[6]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[7]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
|
||||
[8]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
Loading…
Reference in New Issue
Block a user