"I swear by my life and my love of it that I will never live for the sake of another man, nor ask another man to live for mine"

John Galt in Atlas Shrugged, by Ayn Rand

 
>Contents
>Author
The author is magick@wizards.dupont.com. This software is NOT shareware. However, I am interested in who might be using it. Please consider sending me a picture postcard of the area where you live. Send postcards to
      John Cristy
      P.O. Box 40
      Landenberg, PA  19350
      USA
I'm also interested in receiving coins or stamps from around the world for my collection.
Back to Contents
>Availability
ImageMagick, version 5.1.1, is available on ftp.wizards.dupont.com. ImageMagick client executables are available for some platforms. Macintosh, NT, VMS, and Linux source and binaries are also available.


I want ImageMagick to be of high quality, so if you encounter a problem I will investigate. However, be sure you are using the most recent version from ftp.wizards.dupont.com, or a mirror site, before submitting any bug reports or suggestions. Report any problems via the web-based reporting facility.

Back to Contents
 
>WWW
The official ImageMagick WWW page is at www.wizards.dupont.com.
To use display as your external image viewer, edit the global mailcap file or your personal mailcap file .mailcap (located in your home directory) and put this entry:
      image/*; display %s
Back to Contents
 

>Mailing List

There is a mailing list for discussions and bug reports about ImageMagick. To subscribe send the message
      subscribe magick
to majordomo@wizards.dupont.com. You will receive a welcome message which tells you how to post messages to the list magick@wizards.dupont.com.
Back to Contents
 
>Memory Requirements
You should allocate sufficient swap space on your system before running ImageMagick; otherwise, you may experience random server or application crashes. Anything less than 80 megabytes of swap space is likely to cause random crashes.
On many systems, you will find that 80 megabytes is insufficient and you will have to allocate more swap space. You should also have at least 32 megabytes of real memory although 64 megabytes or more is recommended.
Back to Contents
 
>UNIX Compilation
Type:
      gzip -dc ImageMagick-5.1.1.tar.gz | tar xvf -
      cd ImageMagick-5.1.1
If you do not have gunzip, it is available on prep.ai.mit.edu.

 

 

There are currently two mechanisms available to create makefiles to build ImageMagick:

To confirm your build of the ImageMagick distribution was successful, type:
      display
If the program faults make sure that you may have inadvertingly linked to an older version of the libMagick library. In this case type
      cd ImageMagick/magick
      make install
      cd ..
      make
If the image colors are not correct use this command
      display -visual default
You can find other example images in the images directory.


For additional information, see the manual pages for these ImageMagick utilities

Also read the ImageMagick Frequently Asked Questions This is a required reading. Most of the questions I get via electronic mail are answered in this document.
Place display X application defaults in /usr/lib/X11/app-defaults/Display. Use the appropriate name for other clients (e.g. Animate, Montage, etc). To execute display from as a menu item of any window manager (olwm, mwm, twm, etc), use
    display logo:Untitled
Back to Contents
 
>Delegates
To further enhance the capabilities of ImageMagick, you may want to get these programs or libraries:
 
>Background Texture
ImageMagick requires a background texture for the TILE format and for the -texture option of montage. You can use your own or get samples or get additional samples from KPT.
 
>BZLIB
ImageMagick requires the BZLIB library to read or write Zip compressed MIFF images.
 
>RALCGM
ImageMagick requires ralcgm to read Computer Graphic Metafile images (may not compile under linux). You also need Ghostscript (see below).
 
>TransFig
ImageMagick requires fig2dev to read TransFig images.
 
>GET
ImageMagick requires GET to read images specified with a World Wide Web (WWW) uniform resource locator (URL). Note: do not confuse this get program with SCCS get program. If you do not have a HTTP server, you can use xtp, available in the ImageMagick distribution, for URL's whose protocol is FTP.
 
>FreeType
ImageMagick requires the FreeType software, version 1.1 or above, to annotate with TrueType fonts.
 
>HDF
ImageMagick requires the NCSA HDF library to read and write the HDF image format.
 
>HTML2PS
ImageMagick requires html2ps to read HyperText Markup Language (html) documents.
 
>JBIG
ImageMagick requires the JBIG-Kit software to read and write the JBIG image format.
 
>JPEG
ImageMagick requires the Independent JPEG Group's software to read and write the JPEG image format.
Apply the lossless JPEG patch to Independent JPEG Group's source distribution to read lossless jpeg-encoded DICOM images:


Concerning iterative JPEG compression: see Kinoshita and Yamamuro, Journal of Imaging Science and Technology, Image Quality with Reiterative JPEG Compression, Volume 39, Number 4, July 1995, 306-312 who claim that (1) the iterative factor of the repetitive JPEG operation had no influence on image quality, and (2) the first compression determined base image quality.

 
>MPEG
ImageMagick requires the MPEG encoder / decoder to read or write the MPEG image format.
 
>PNG
ImageMagick requires the PNG library, version 1.0 or above, to read the PNG image format.
 
>Postscript
ImageMagick requires Ghostscript software to read the PostScript or the Portable Document format. It is used to annotate an image when an X server is not available. See the FreeType library above for another means to annotate an image. Note, Ghostscript must support the ppmraw device (type gs -h to verify). If Ghostscript is unavailable, the Display Postscript extension is used to rasterize a Postscript document (assuming you define HasDPS). The DPS extension is less robust than Ghostscript in that it will only rasterize one page of a multi-page document.
 
>RA_PPM
ImageMagick requires ra_ppm from Greg Ward's Radiance software to read the Radiance image format (may not compile under linux).
 
>RAWTORLE
ImageMagick requires rawtorle from the Utah Raster Toolkit to write the RLE image format (may not compile under linux)..
 
>SANE
ImageMagick requires scanimage to import images from a scanner device.
 
>TIFF
ImageMagick requires Sam Leffler's TIFF software to read and write the TIFF image format. It in turn optionally requires the JPEG and ZLIB libraries.
 
>WMF
ImageMagick requires wmftopng to read Windows Meta File images.
 
>X Server
ImageMagick requires an X server for display and animate to work properly. This free X server is available for Windows and Macintosh.
 
>ZLIB
ImageMagick requires the ZLIB library to read or write PNG or ZLIB compressed MIFF images.
Back to Contents
 

>How to Compile

The following procedure describes how to build ImageMagick extension libraries in subdirectories of the ImageMagick directory. An alternative to these procedures is to install one or more of these under your system's regular include/lib directory (e.g. the directory specified by --prefix to configure or /usr/local). This allows the libraries to be shared by other packages. When using the configure script, the two schemes may be mixed. Also, please note that when the configure option --enable-shared is not disabled, these procedures must be supplemented with whatever compilation flags are required on your system to generate PIC code. In the case of gcc, this usually means that -fPIC must be added to the compiler options (i.e. CFLAGS) when building each delegate library.
To display images in the HDF, JPEG, PNG, TIFF or TTF format, get the respective archives and build ImageMagick as follows:
HDF
      cd ImageMagick
      gunzip -c HDF4.1r3.tar.gz | tar xvf -
      mv HDF4.1r3 hdf
      cd hdf
      configure
      make -k hdf-libnofortran
      cd ..
JBIG
      cd ImageMagick
      gunzip -c jbigkit-1.1.tar.gz | tar xvof -
      mv jbig-kit jbig
      cd jbig
      make
      cd ..
JPEG
      cd ImageMagick
      gunzip -c jpegsrc.v6b.tar.gz | tar xvof -
      mv jpeg-6b jpeg
      cd jpeg
      configure
      make
      cd ..
PNG
      cd ImageMagick
      gunzip -c libpng-1.0.3.tar.gz | tar xvf -
      mv libpng-1.0.3 png
      cd png
      make
      cd ..
TIFF
      cd ImageMagick
      gunzip -c tiff-v3.5.4.tar.gz | tar xvof -
      mv tiff-v3.5.4 tiff
      cd tiff
      ./configure
      make
      cd ..
TTF
      cd ImageMagick
      gunzip -c freetype-1.3.1.tar.gz | tar xvof -
      mv freetype-1.3.1 ttf
      cd ttf
      ./configure -disable-shared
      make
      cd ..
ZLIB
      cd ImageMagick
      gunzip -c zlib-1.1.3.tar.gz | tar xvf -
      mv zlib-1.1.3.tar.gz zlib
      cd zlib
      make
      cd ..
If your computer system supports shared libraries you must type
      make install
Finally, perform the following:
      cd ImageMagick
      edit Magick.tmpl and define Has???? as instructed
      xmkmf
      make Makefiles
      make clean
      make
If prefer to use configure rather than Imake:
      configure
      make clean
      make -k
If the compile fails due to a function redefinition it may be that either jpeg/jconfig.h or mpeg/mpeg.h is redefining const. Fix this problem and try again.
You can now convert or display images in the JPEG, TIFF, PNG, etc. image formats.
If you have HDF, JBIG, JPEG, PNG, and TIFF sources installed as directed above, you can also type
      Install sun
Substitute the appropriate machine type (aix, hpux, sgi, etc).
Back to Contents
 

>VMS Compilation

You might want to check the values of certain program definitions before compiling. Verify the definitions in delegates.mgk to suit your local requirements. Next, type:
      unzip ImageMagick-5.1.1.zip
      set default [.imagemagick]
      @make
      set display/create/node=node_name::
where node_name is the DECNET X server to contact.

Finally type:
      display
Alternatively, get a zipped distribution (with JPEG, PNG, TIFF, and TTF) from ftp.wizards.dupont.com.
The VMS JPEG, PNG, TIFF, and TTF source libraries are available on axp.psl.ku.dk in [anonymous.decwindows.lib].
Thanks to pmoreau@cenaath.cena.dgac.fr for supplying invaluable help as well as the VMS versions of the JPEG, PNG, TIFF, and TTF libraries.
Back to Contents
 

>Windows NT/95 Visual C++ 6.0 Compilation

The Visual C++ distribution targeted at Windows The NT is provided in the VisualMagick subdirectory of the distribution. There are two workspaces (DSW files) that can be used to do the complete build:
    VisualMagick.dsw : The one used to build everything as DLL's
    VisualMagickStatic.dsw: The one used to build everything as
                            static standalone executable
A complete build can be accomplished by simply doing:
    Build: Batch Build: Clean
    Build: Batch Build: Build
The Clean step is needed in order to make sure that all of the target support libraries are updated with any patches needed to get them to compile properly on Windows.
All of the required files that are needed to run any of the command line tools will be found in the "bin" subdirectory of the VisualMagick subdirectory. This includes EXE, and DLL files. You should be able to test the build directly from this directory without having to move anything to any of the global SYSTEM or SYSTEM32 areas in the operating system installation.
NOTE: The two utilities display and animate will compile and link but not function in the default build environment. This is due to the fact that the default build environment uses the X11 stubs to supply non-functional stubs for X-Window functionality. This is due to the lack of a high need for this on a Windows NT or Win95 only system. Work is underway to add X11 libraries to the standard distribution in the neat future.
To view any image in a Microsoft window, type
    convert image.ext win:
Import works if you have at least one X window open. Alternatively, type
    convert x:root image.png
Make sure gswin32 (Ghostscript) is in your execution path (see Autoexec.bat), otherwise, you will be unable to convert or view a Postscript document.
Make sure iexplore (Internet Explorer) is in your execution path (see Autoexec.bat), otherwise, you will be unable to browse the ImageMagick documentation.
The NT executables will work under Windows 95/98.
Back to Contents
 
>Macintosh Compilation
The Macintosh Macintosh distribution contains MetroWerks Codewarrior Professional projects for compilation. For those who do not have access to CodeWarrior, the binaries for the command line utilities are enclosed. I had to comment the inline intrinsic functions in math.h in order to compile. If you have a better solution, let me know. Display, animate, and import currently do not work on the Macintosh.
I'm looking for a volunteer to get Display and animate to work on the Macintosh. I also need a volunteer is needed to write a simple Mac program to call the libMagick routines and display an image in a window.
Back to Contents
 
>Animation
To prevent color flashing on visuals that have colormaps, animate(1) creates a single colormap from the image sequence. This can be rather time consuming. You can speed this operation up by reducing the colors in the image before you animate them. Use mogrify to color reduce the images:
      mogrify +map -colors 256 scenes/dna.[0-9]*
Alternatively, you can use a Standard Colormap; or a static, direct, or true color visual. You can define a Standard Colormap with xstdcmap(1). For example, to use the "best" Standard Colormap, type:
      xstdcmap -best
      animate -map best scenes/dna.[0-9]*
or to use a true color visual:
      animate -visual truecolor scenes/dna.[0-9]*
Image filenames can appear in any order on the command line if the scene keyword is specified in the MIFF image. Otherwise the images display in the order they appear on the command line. A scene is specified when converting from another image format to MIFF by using the "scene" option with any filter. Be sure to choose a scene number other than zero. For example, to convert a TIFF image to a MIFF image as scene #2, type:
      convert -scene 2 image.tiff image.miff
Back to Contents
 

>16-BIT Imaging

By default, ImageMagick uses a color depth of 8 bits (e.g. [0..255] for each of red, green, blue, and transparency components). Any 16-bit image is scaled immediately to 8-bits before any image viewing or processing occurs. If you want to work directly with 16-bit images (e.g. [0..100535]), edit Magick.tmpl and define QuantumLeap or use -enable-16bit with configure. Next, type:
    make clean
    make
In 16-bit mode expect to use about 33% more memory on the average. Also expect some processing to be slower than in 8-bit mode (e.g. Oil Painting, Segment, etc).

In general, 16-bit mode is only useful if you have 16-bit images that you want to manipulate and save the transformed image back to a 16-bit image format (e.g. PNG, VIFF).

Back to Contents
 

>64-BIT Machines

Each pixel, within ImageMagick, is represented by the PixelPacket structure found in magick/image.h. Only 8 bits are required for each color component and 16 bits for the colormap index for a total of 6 bytes. If QuantumLeap is defined (see 16-BIT IMAGING above), the color component size increases to 16 bits for a total of 10 bytes. Some 64-bit machines pad the structure which can cause a significant waste of memory. For the cray, change the PixelPacket structure to this
    typedef struct _PixelPacket
    {
      unsigned char
        red : QuantumDepth,
        green : QuantumDepth,
        blue : QuantumDepth,
        opacity : QuantumDepth;

      unsigned short
        index : 16;
    } PixelPacket;
before compiling.

I'm not sure if this will work on other 64-bit machines that pad. If you know a better solution, please send me E-mail. Note, that the Dec Alpha apparently does not pad the structure so ImageMagick should be fine on this particular 64-bit machine.

Back to Contents
 

>MIFF Image Format

MIFF is an image format which I developed. I like it because
  1. It is machine independent. It can be read on virtually any computer. No byte swapping is necessary.
  2. It has a text header. Most image formats are coded in binary and you cannot easily tell attributes about the image. Use more(1) on MIFF image files and the attributes are displayed in text form.
  3. It can handle runlength-encoded images. Although most scanned images do not benefit from runlength-encoding, most computer-generated images do. Images of mostly uniform colors have a high compression ratio and therefore take up less memory and disk space.
  4. It allows a scene number to be specified. This allows you to specify an animation sequence out-of-order on the command line. The correct order is determined by the scene number of each image.
  5. MIFF computes a digital signature for images. This is useful for comparing images. If two image files have the same signature, they are identical images.
  6. There is a montage keyword allowing an image to act as a visual image directory. See display(1) for more details.
One way to get an image into MIFF format is to use convert or read it from an X window using the import program. Alternatively, type the necessary header information in a file with a text editor. Next, dump the binary bytes into another file. Finally, type
      cat header binary_image | display -write image.miff -
For example, suppose you have a raw red, green, blue image file on disk that is 640 by 480. The header file would look like this:
      id=ImageMagick columns=640 rows=480 :
The image file would have red, green, blue tuples (rgbrgbrgb...). Refer to the display manual page for more details.
Back to Contents
 

>Copyright

Copyright (C) 2000 ImageMagick Studio
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ("ImageMagick"), to deal in ImageMagick without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of ImageMagick, and to permit persons to whom the ImageMagick is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of ImageMagick.
The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.In no event shall ImageMagick Studio be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with ImageMagick or the use or other dealings in ImageMagick.
Except as contained in this notice, the name of the E. I. du Pont de Nemours and Company shall not be used in advertising or otherwise to promote the sale, use or other dealings in ImageMagick without prior written authorization from the ImageMagick Studio.

Home Page Image manipulation software that works like magic.