The easiest way to convert images to grayscale ( graylevel ) is by using "imagemagick" the image manipulation programs suite. Use the commands below to install imagemagick installed on your Linux system if you have not done so yet:
Fedora/Redhat
# yum install imagemagick
Ubuntu/Debian
# apt-get install imagemagick

Convert Image to grayscale

The procedure to convert color to grayscale it simple. Here is our original color image which needs to be converted to grayscale:


now we convert the above image to grayscale:
$ convert linuxcareer-color.png -colorspace gray linuxcareer-color-grayscale.png
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: