Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ ImageMagick Tutorial: How to cut images in Linux command line     - JavaScript original values and complex values (Programming)

- Thinking in Java study notes - Access modifiers (Programming)

- Ubuntu user use PPA to install Uget 2.0.5 (Linux)

- Gitolite how to import other Git repositories (Server)

- Use HttpClient remote interface testing (Programming)

- Linux Learning Notes: Users and Groups (Linux)

- A brief description of Java 8 new features introduced syntax (Programming)

- Hibernate Performance Optimization of EHCache cache (Programming)

- Ordinary users how to use the firewall software (Linux)

- Oracle data row split multiple lines (Database)

- The maximum subsequence algorithm and optimization problems (Programming)

- DataGuard add temporary data files bug (Database)

- Create a project using Android Studio LinearLayout (Programming)

- 14.04.3 Ubuntu configuration and successfully compiled source code Android 6.0 r1 (Programming)

- Let OS X support NTFS write file (Linux)

- Manually create Oracle Database Explanations (Database)

- Getting Started with Linux system to learn: How do I know which processes are running on the CPU core (Linux)

- IP Security Policy is to learn how to prevent Ping and closed ports (Linux)

- Android Unzip the ZIP / GZIP data (based on the InflaterInputStream implementation) (Programming)

- CentOS7 virtual machine creation failed Solution (Linux)

 
         
  ImageMagick Tutorial: How to cut images in Linux command line
     
  Add Date : 2017-08-31      
         
         
         
  Question: I want to remove the image files white blank, there is no convenient way to image files can be tailored at the Linux command line?

When it comes to conversion in Linux or edit the image file, ImageMagick is undoubtedly one of the most well-known integration software. It contains a set of command-line tool to display, convert, or copy in more than 200 types of raster or vector image files, all of which is done at the command line. ImageMagick can be used for a variety of image editing tasks such as converting file formats, add special effects, add text, and change the image (resize, rotate, flip, crop).

If you wish to crop the image to remove the blank, you can use ImageMagick comes with two command-line tools. If you have not installed ImageMagick, please refer to the following useful links to install.

In this tutorial, let's cut the following PNG image. We want to remove the right and bottom edges of the image, so that the icon is centered.

First, the size of the identified image file (width and height). You can use the identity command.

$ Identify chart.png
chart.png PNG 1500x10001500x1000 + 0 + 08-bit DirectClass31.7KB0.000u0: 00.000
As illustrated above, the input image is 1500x1000px.

Next, determine the image trimming to do two things: (2) the size of the rectangular clipping region (1) Location trimming image began.

In this example, let us assume that the image cropped from the top left, with a more precise point at x = 20px and y = 10px, in that case, the image size is trimmed 1200x700px.

Tools for cropping an image is convert. Use "-crop" option is selected, convert the command will be cut out a rectangular area in the input image.

$ Convert chart.png -crop 1200x700 + 20 + 10 chart-cropped.png
Specify the input image to image storage chart.png, convert the command will be trimmed to chart-cropped.png.
     
         
         
         
  More:      
 
- Java multithreading easy to confuse the concept (Programming)
- Java8 Lambda expressions and flow operations (Programming)
- Use 3G wireless network card under Linux (Linux)
- Configuring s3c-linux-2.6.28.6-Real6410 appears Unable to find the QT3 installation (Linux)
- SQL statement to repair SQL Server database (Database)
- PyCharm new Python file name and the name of the module will import the same problem might arise (Programming)
- 5 tips to improve your Linux desktop security (Linux)
- shell script error dirname: invalid option - b (Database)
- After VMware CentOS full VM clone the network card is unavailable Solutions (Linux)
- How to Install Foreman under Ubuntu (Server)
- Using iptables achieve NAT (Linux)
- Build your own Git server under Linux (Server)
- C ++ thread creates transmission parameters are changed (Programming)
- Squid proxy server configuration under Linux (Server)
- Linux iostat command example explanation (Linux)
- Postfix mail service system principle and configuration (Linux)
- Linux Shell Scripting (Programming)
- C language Bubble Sort - integer sort (Programming)
- Oracle Enterprise Linux 64-bit install apache-tomcat-7.0.53 step (Server)
- Java eight new features 8 (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.