Go to TogaWare.com Home Page.
GNU/Linux Desktop Survival Guide
by Graham Williams
Google

Mogrify


The command line mogrify is excellent for modifying an image: resize, rotate, recolour, etc.

Resize an Image

$ mogrify -geometry

This will maintain the image's aspect ratio (the specified width and height are maximum values). To force a change to the aspect ratio append the geometry with an exclamation point.

Rotate an Image

$ mogrify -rotate

Reduce Colours

$ mogrify -colors 2 <filename>

Reduce and Dither Colours

$ mogrify -colors 4 -dither <filename>

Monochrome

$ mogrify -monochrome <filename>

Annotate Image

$ mogrify -comment 'My holiday highlight' <filename>

Borders

$ mogrify -border 2x4 <filename>

This adds a border of 2 pixels wide and 4 pixels high.

Decorative Border

$ mogrify -frame 20x20 <filename>


Copyright © 1995-2006 [email protected]
Contribue and access the PDF Version