• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Install and Use GraphicsMagick to Edit Images CLI

2448

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:
Resize

Resized image

Crop

You can also crop an image by running the following command.

root@linuxhelp:~/Desktop# gm convert -crop 300x300 LINUX.png crop.png

Original image:
Crop

Cropped image:

Mirror

You can also mirror an image by running the following command.

root@linuxhelp:~/Desktop# gm convert -flop LINUX.png flop.png

Original image:
Desktop

Mirrored image:

Desk

Also, you can flip an image by running the following command.

root@linuxhelp:~/Desktop# gm convert -flip LINUX.png flip.png

Original image:
Linux

Flipped image:

Mirror

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

Black and white image:

White
With this, the tutorial on installing and using GraphicsMagick to Edit Images CLI comes to an end.


Tags:
jackson
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How does GraphicsMagick differ from ImageMagick?

A

GraphicsMagick is originally based on (forked from) ImageMagick 5.5.2 in November 2002, from the version distributed by ImageMagick Studio LLC, which is itself forked in August 1999 from ImageMagick developed by E. I. du Pont de Nemours and Company starting in 1992. Other than utilities being executed as sub-commands of the 'gm' command, the command-line syntax and programming APIs remain entirely upward compatible with ImageMagick 5.5.2. A better question might be "How does ImageMagick differ from ImageMagick?" since ImageMagick continues to alter and evolve its interfaces so they are no longer completely compatible with earlier versions. While GraphicsMagick also adds new features, it does so in a way which assures that existing features work as they did before. ImageMagick focuses on adding new functionality and features and has dramatically mutated several times since the fork.

Q

How often does GraphicsMagick pick up new code from ImageMagick?

A

GraphicsMagick never picks up new code from ImageMagick as distributed by ImageMagick Studio LLC. Not long after the GraphicsMagick project was started in November 2002, ImageMagick from ImageMagick Studio LLC abandoned the MIT X11 style license it had been using since 1992, and switched between several different licenses until it ended up with one based on the Apache license, which is intended to penalize projects which borrow some of its source code, or fork from it. Since that time, GraphicsMagick has not incorporated any ImageMagick source code.

Q

Are there any plans to use OpenCL or CUDA to use a GPU on GraphicsMagick?

A

It is well known that some math-intensive algorithms run very quickly on video-card (and stand-alone) GPUs. Video card vendors encourage you to buy an expensive video card with quite a lot of installed RAM and modify applications to use the GPU via their proprietary or limited-purpose APIs. GPUs are quite effective at producing images for real-time display, such as for video games and virtual reality. GraphicsMagick has been significantly updated to use multiple CPU cores to speed up the image processing, and work continues to thread the few remaining algorithms, or remove inefficiencies in algorithms which don't see as much speed-up as they should. Linear speedup as cores are added is typical for CPU-bound algorithms on well-designed CPUs. Regardless, Amdahl's law is a significant factor in GraphicsMagick, with non-parallelizable code paths often dominating the time.

Q

What is the meaning of "magick" in GraphicsMagick?

A

According to the infamous British occultist Aleister Crowley, the definition of magick is "the science and art of causing a change to occur in conformity with the will". "https://en.wikipedia.org/wiki/Magick_(Thelema)","https://en.wikipedia.org/wiki/Aleister_Crowley"

Q

How do I set the transparency index in a GIF image so it displays properly within Mozilla in GraphicsMagick?

A

Display your GIF image with display. Choose Matte from the Image Edit command menu and identify a pixel that has the transparency color. Press Method and select a matte edit method from a pop-up menu. Choose from these methods:

point
replace
floodfill

Related Tutorials in How to Install and Use GraphicsMagick to Edit Images CLI

Related Tutorials in How to Install and Use GraphicsMagick to Edit Images CLI

How to Install and Use GraphicsMagick to Edit Images CLI
How to Install and Use GraphicsMagick to Edit Images CLI
Mar 21, 2018
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.