Imagemagick Command to Compress the Size & Change Quality of Image in Terminal
136 views
Jun 3, 2025
Buy the full source code of application here:
View Video Transcript
0:00
uh hello guys uh welcome to this video
0:02
so in this video I will show you how to
0:04
reduce the quality of the image or how
0:06
to compress the size of the image in the
0:09
terminal for this we'll be using this
0:11
library image magic if you just go to
0:14
this website and it's a free open-source
0:17
image processing library and it's
0:19
available for Linux Windows and Mac so
0:22
I'm there on the Windows machine so
0:26
simply open the terminal where all the
0:28
images are present you can see the
0:30
original size of this image is 108
0:33
kilobyte and now I will reduce this size
0:36
by simply executing a very simple
0:39
command magic 1 jpg so we simply write
0:43
magic and followed by the name of the
0:45
file and then we can adjust the quality
0:48
here of the image from 0 to 100 you can
0:51
provide any value so let's suppose I
0:53
provide here 50 and then I will simply
0:56
say
0:57
compressed dot jpg so as soon as I press
1:01
the enter key you will see it will
1:03
create a new file which will be
1:05
compressed jpg so if you see now it
1:09
actually created this the quality
1:12
remains the same but if you see the size
1:14
difference you can see it is reduced to
1:17
84.1 kilobyte and it's from
1:22
108 and you can adjust it even more
1:25
let's suppose I say quality should be
1:27
around
1:29
20 so now if you see the
1:33
size 45 kilobyte
1:37
So still the quality I think remains the
1:40
same but in this easy way guys you can
1:43
reduce or compress the size of an uh JPG
1:46
or PNG image right in the terminal
1:49
itself you can see the size original
1:51
size is 108 KB but now this is the
1:55
compressed image which is 45.8 KB so in
2:00
this easy way guys you can reduce the
2:02
size of this image by using image magic
2:05
in the terminal and also check out my
2:07
website which is freemediatools.com
2:10
uh which contains thousands of tools
#Multimedia Software