-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Working with Linux ??? Quick Hacks for the Command Line
By :
In this chapter, we will learn how to process images from the command line. We will start with the most complex and widely used image command line interface processing toolkit called ImageMagick. To install it, run the following:
sudo apt install imagemagick

As you can see, we have already installed it.
Now, let's find some images to process. Let's use the default Ubuntu backgrounds that can be found in /usr/share/backgrounds. Let's copy the backgrounds to another location so that we don't alter our default ones.
We'll take a look at the first image in our list: we can see from ls that it is a JPEG image of 1.6 MB. To open it and see how it looks, let's use the eog (eye of gnome) image viewer:

The first and most important part of knowing how to process an image is knowing what that image actually is. To find this out, ImageMagick comes with a tool called identify. In its simplest form, you have to feed it an image name and it will output information like...
Change the font size
Change margin width
Change background colour