How to Install and Use GraphicsMagick to Edit Images CLI
To Install and Use GraphicsMagick to Edit Images CLI
GraphicsMagick is a tool that allows editing images from the terminal. It claims to be a handy tool for those cases in which you have to do some quick image editing and don' t want to open a heavy program such as Photoshop or GIMP. It is packed with several cool features and some of them are listed below.
Features
This tools offers different options for editing your images:
- Resize
- Crop
- Change colors
- Animate
- Create montages
- Compare images
- Mirror
Install and Use GraphicsMagick is so simple and this tutorial covers the ground on the same topic.
Installing GraphicsMagick
First, you shall proceed with the installation of GraphicsMagick by making use of the following command.
root@linuxhelp:~# apt-get install graphicsmagick
Reading package lists... Done
Building dependency tree
.
. Processing triggers for mime-support (3.59ubuntu1) ...
Setting up graphicsmagick (1.3.23-1build1) ...
Now that GraphicsMagick has been installed, you shall see the different kinds of its uses now. GraphicsMagick has different image editing options. You can list them all by typing in a terminal as follows.
root@linuxhelp:~# gm
GraphicsMagick 1.3.23 2015-11-07 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2015 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
.
.
montage - create a composite image (in a grid) from separate images
time - time one of the other commands
version - obtain release version
in this tutorial I' ll show you how to use some of these options.
You can also resize an image by running the following command.
root@linuxhelp:~/Desktop# gm convert -resize 300 LINUX.png resize300.png
Original image:
Resized image
You can also crop an image by running the following command.
root@linuxhelp:~/Desktop# gm convert -crop 300x300 LINUX.png crop.png
Original image:
Cropped image:
You can also mirror an image by running the following command.
root@linuxhelp:~/Desktop# gm convert -flop LINUX.png flop.png
Original image:
Mirrored image:
Also, you can flip an image by running the following command.
root@linuxhelp:~/Desktop# gm convert -flip LINUX.png flip.png
Original image:
Flipped image:
You can also change a colored image to black and white by running the following command.
root@linuxhelp:~/Desktop# gm convert -monochrome LINUX.png mono.png
Original image:
Black and white image:
With this, the tutorial on installing and using GraphicsMagick to Edit Images CLI comes to an end.
Comments ( 0 )
No comments available