linux poison RSS
linux poison Email

Modify Images in Linux - Mogrify

The  Mogrify program is a member of the ImageMagick suite of tool, use the mogrify program to re-size an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. This tool is similiar to convert except that the original image file is overwritten (unless you change the file suffix with the -format option) with any changes you request.

Imagemagick Mogrify is an easy to use, ligte, command prompt tool and capable of editting most of the image types.

Using Mogrify:
If you want to transform all the .tiff images in a directory to .jpg, you can do it with a single command:
mogrify -format jpeg *.tiff

Create thumbnails using this command:
mogrify -geometry 120x120 *.jpg

To reduce the size of any given image, use this command:
mogrify -resize 50% *.jpg

You can resize all your JPEG images in a folder to a maximum dimension of 256x256 with this command:
mogrify -resize 256x256 *.jpg

Convert PNG images to the JPEG format:
mogrify -format jpg *.png

Rotate an Image using this command
mogrify -rotate "-90" test.jpg

Reduce Colours of any given image using this command
mogrify -colors 2 test.jpg

Monochrome the given image using this command
mogrify -monochrome test.jpg

Add Borders to given image using this command
mogrify -border 2x4 test.jpg

Add Annotate to Image using this command
mogrify -comment 'My holiday highlight' test.jpg

Add some more Decorative Border using this command
mogrify -frame 20x20 test.jpeg

For more information about the ImageMagick project, visit
Run ‘mogrify -help’ to get a summary of the mogrify command options.


ovigia said...

nice post!

by the way is a better and optimized imagemagick.

Post a Comment

Related Posts with Thumbnails