Google Plus

ImageMagick in Command line

Written by Mel Kham on . Posted in Linux tutorials

 

 

ImageMagick is an open source software suite for displaying, converting, and editing raster image files. It can read and write over 100 image file formats. ImageMagick is licensed under the ImageMagick License, a BSD-style license.

Let give some example how to use tool from the commands line

 

 

Convert a image PNG to JPEG en giving rate of the compression :

convert -quality 96 image.png image.jpg

Convert in the same folder all images PNG to JPEG :

mogrify -format png *.jpg

Convert all images (jpg, png…) to PDF :

convert images*.* file.pdf

Resize the size of an image :

convert -resize 48×48 image.png image-mini.png

Resize the size of all images in a folder :

mogrify -resize 48×48 *.png

Resizing an image showing only the width :

convert -resize 620x image.png image-620.png
Resizing an image showing only the height:

convert -resize x100 image.png image-100.png

Create a icon :

convert -colors 256 -resize 16×16 image.jpg favicon.ico

Convert a color image into black and white :

convert -type image.jpg image-noir-blanc.jpg

Add a border of 1 pixel transparent around an image :

convert -bordercolor Transparent -border 1×1 image.png image-bordure.png

Add a black border of 10 pixels around an image:

convert -bordercolor #000000 -border 10×10 image.png image-bordure.png

Making a negative of a image :

convert -negate image.png image-negate.png

Return an image from bottom to top :

convert -flip image.png image-inversee.png

Return an image from left to right :

convert -flop image.png image-inversee.png
Use ImageMagick GUI :

display image.png

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

DragonFartOutLoud

|

it went to china.

DragonFartOutLoud

|

great review! i’ve been using it as my main OS since Beta 1 release. its been a awesome ride so far :)

jet li

|

i try the method, and i unzip the image contain zip secret, i dont find the file that i was hide, where it go? and how to open it? :s

zinovsky

|

Yes, it is possible using Steganography, we will post another quick howto do that in the next few days

SK

|

Hey Abhishek

Yes there are many open source tools available to meet your requirements. They are easy to manage and has a decent web gui to configure. We will publish all of them one by one shortly. Stay tuned with us.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .