ImageMagick: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 48: Line 48:
</source>
</source>


http://www.imagemagick.org/script/command-line-processing.php


http://www.imagemagick.org/script/command-line-processing.php
=== Seeing available formats ===
 
<source lang="bash">
convert -list format
</source>

Revision as of 21:26, 22 April 2009

ImageMagick is the "swiss army knife" image manipulation program for the (FLOSS) world. In addition to a collection of powerful command line utilities, ImageMagick is available via libraries in most of the popular (web) scripting languages.

Installing

Ubuntu / Debian

Imagemagick may very well be pre-installed on your system. Otherwise use synaptic or apt-get to pull in the "imagemagick" package.

Gentoo Linux

You should be able to simply "emerge imagemagick" using Portage. You'll probably want to make sure that "truetype" is enabled in the use flags, as this allows you to open and use TrueType fonts.

Mac OS X

There is now a "binary distribution" for Mac OS X on the main imagemagick website. You simply unpack the files, move the resulting folder to a convenient location (say in your home directory), then tweak some environment variables so your system can find everything.

Command line Tools

Here's a list of the command-line tools that get installed:

  • animate
  • compare
  • composite
  • conjure
  • convert
  • display
  • identify
  • import
  • Magick-config
  • Magick++-config
  • mogrify
  • montage
  • Wand-config

Resources

Working with raw image data

ImageMagick supports using an "explicit image format" syntax when opening image data. This includes special "raw" formats: gray, rgb, ...

Example:

convert -size 640x480 -depth 8 rgb:image image.png

http://www.imagemagick.org/script/command-line-processing.php

Seeing available formats

convert -list format