'ImageMagick 3.9.3 README;NF,
B

 
<"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 formine"

=John Galt in Atlas Shrugged, by Ayn Rand


 


Contents











Author


The author isScristy@mystic.es.dupont.com. ThisJsoftware 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
A
I'm also interested in receiving coins from around the world.
0

Back to Contents









Availability

7
ImageMagick, version 3.9.3, is available on 8/ftp.wizards.dupont.com. ImageMagick clientOexectuables!are available for some platforms.IMacintosh,ANT,GVMS, andFLinux'source and binaries are also available.

0I want ImageMagick to be of high quality,Kso if you encounter a problem I will investigate. However, be sure you&are using the most recent version from8Gftp.wizards.dupont.com, or a mirror site, before submitting any bugreports or suggestions.


0

Back to Contents








WWW

2
The official ImageMagick WWW page is at@Cwww.wizards.dupont.com. Another useful ImageMagick WWW page isDThe Imaging Machine

To use Gdisplay as your external imageviewer, edit the Hglobal mailcap file or your personal mailcap file .mailcap4(located in your home directory) and put this entry:
      image/*; display %s






0

Back to Contents







Mailing List

A
There is a mailing list for discussions and bug reports about2ImageMagick. To subscribe send the message



      subscribe magick
toO
majordomo@wizards.dupont.com.GYou will receive a welcome message which tells you how to post messages to the listImagick@wizards.dupont.com.


0

Back to Contents







Memory Requirements

D
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.

E

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 megabytesor more is recommended.


0

Back to Contents







UNIX Compilation

Type:
%      gunzip ImageMagick-3.6.5.tar.gz#      tar xvf ImageMagick-3.6.5.tar      cd ImageMagick


F

You might want to check the values of certain program definitionsEbefore compiling. Change the definitions of ApplicationDefaults,4BrowseCommand, EditorCommand, PostscriptColorDevice,MPrintCommand, RGBColorDatabase, and TemporaryDirectoryHin magick/magick.h to suit your local requirements. Next, editJMagick.tmpl and set the variables to suit your local environment. Finally type:



      xmkmf      make Makefiles
      make -k
LNote, ImageMagick requires an ANSI compiler. If the compile fails,Lfirst check to ensure your compile is ANSI compatible. If it fails for someother reason, try
      cd magick
      make -k      cd ..
      make -k




If you do not have G gunzip(1),7it is available on prep.ai.mit.edu. If you do not haveIxmkmf(1), or if xmkmf(1) fails to produce usable Makefiles,type



      configure
      make


6If you perfer shared libraries instead of static, type



      make shared


GIf you use gcc and get a link error, recompile with the optionL-fPIC. If you use gcc and get a core dump, recompile withJthe option -fwritable-strings. Change ReadBinaryType to<"r" and WriteBinaryType to "w" in%magick/magick.h for FreeBSD.



Finally type:

      display
J
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


4If the image colors are not correct use this command

      display -visual default
G
You can find other example images in the images directory.

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





$

Also read the ImageMagick4Frequently Asked QuestionsGThis is a required reading. Most of the questions I get via electronic#mail are answered in this document.

3

Place display X application defaults inC/usr/lib/X11/app-defaults/Display. Use the appropriate name/for other clients (e.g. Animate, Montage, etc).;To execute displayDfrom as a menu item of any window manager (olwm, mwm, twm, etc), use



    display logo:Untitled


4

The ImageMagick utilities read and write +MIFF images. ReferBto the end of this message for more information about MIFF.Use Bconvert to convert images to andfrom the MIFF format.

6

ImageMagick utilities recognizes many imageBformats and for your convenience$automatically converts most of theseBalien image format to MIFF at execution time. However, the?MIFF image format has several advantages over most imageIformats (i.e. runlength encoding, visual image directories,digital signature on anAimage colormap, etc.). ImageMagick is designed to exploit?these advantages. Whenever possible convert an alien imageLformat to the MIFF format before using the various ImageMagickprograms.

/

Other formats may also be recognized. See /convert for a:list of valid image formats. You can specify a particular;image format by prefixing the image filename with the image)type and a colon (i.e. ps:image).




0

Back to Contents







Extra Programs and Libraries

F
To further enhance the capabilities of ImageMagick, you may(want to get these programs or libraries:





E
X11 Stubs 

K
ImageMagick requires the X11 libraries. If your system does notOhave them, use this library instead. Display,-animate, orHimport will not work with this library.2The remaining programs have reduced functionality.



D
Background Texture 

H
ImageMagick requires a background texture for the TILE-format and for the -texture option of 3montage. You can:use your own or get samples or get additional samples from0 KPT.







ARALCGM

I
ImageMagick requires ralcgm to read Computer Graphic2Metafile images (may not compile under linux).







F TransFig

N
ImageMagick requires fig2dev to read TransFig images.






4
GET

+
ImageMagick requires GET <to read images specified with a World Wide Web (WWW) uniformJresource locator (URL). Get(1) must be in /usr/local/bin.KSee WWWcommand in magick/magick.h to change its location.F Note: do not confuse this get program with SCCS get program.5If you do not have a HTTP server, you can use ,xtp, availableCin the ImageMagick distribution, for URL's whose protocol is FTP.




9HDF

;
ImageMagick requires the NCSA HDF library.to read and write the HDF image format.






K JBIG 


<
ImageMagick requires the JBIG-Kit software/to read and write the JBIG image format.






4 JPEG 


L
ImageMagick requires the Independent JPEG Group's software(to read and write the JPEG image format.

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







;
MPEG 

0
ImageMagick requires the MPEG library2to read the MPEG image format. Use encoder6 encoder to write MPEG images.







K PICTTOPPM

0
ImageMagick requires picttoppm%to read Macintosh PICT images.







H
 FreeType 

F
ImageMagick requires the FreeType software to annotate withTrueType fonts.




C Postscript 



ImageMagick requires ?Ghostscript software?to read the PostScript or the Portable Document format. BIt is used to annotate an image when an X server is not available.FSee the FreeType library above for another means to annotate an image.HNote, Ghostscript must support the ppmraw device (type gs -h to verify).BIf Ghostscript is unavailable, the Display Postscript extension isEused to rasterize a Postscript document (assuming you define HasDPS).JThe DPS extension is less robust than Ghostscript in that it will only ,rasterize one page of a multi-page document.






8
PNG

M
ImageMagick requires the PNG library to read the PNGimage format. SeeH Portable Network Graphics for more details.






1
RA_PPM 

N
ImageMagick requires ra_ppm from Greg Ward's RadianceIsoftware to read the Radiance image format (may not compile under linux).

A

RAWTORLE


G
ImageMagick requires rawtorle from the Utah RasterIToolkit to write the RLE image format (may not compile under linux)..



6
TIFF 

I
ImageMagick requires Sam Leffler's TIFF software/to read and write the TIFF image format.






<
ZLIB 

/
ImageMagick requires the ZLIBAlibrary to read the PNG image format or read or write ZLIBcompressed MIFF images.



0

Back to Contents







How to Compile

H
To display images in the HDF, JPEG, MPEG, PNG, TIFF orNTTF format, get the respective archives and build ImageMagick asfollows:






HDF


      cd ImageMagick+      gunzip -c HDF4.0r2.tar.gz | tar xvf -      mv HDF4.0r2 hdf      cd hdf      configure      make -k allnofortran      cd ..




JBIG


      cd ImageMagick/      gunzip -c jbigkit-0.9.tar.gz | tar xvof -      mv jbig-kit jbig
      cd jbig
      make      cd ..




JPEG


      cd ImageMagick/      gunzip -c jpegsrc.v6a.tar.gz | tar xvof -      mv jpeg-6a jpeg
      cd jpeg$      configure CC=cc -with-maxmem=7
      make      cd ..




MPEG


      cd ImageMagick      mkdir mpeg
      cd mpeg3      gunzip -c mpeg_lib-1.2..1.tar.gz | tar xvof -      mv mpeg_lib/* .;        edit Makefile as instructed; for Solaris use theC        BSD-compatibility libraries or replace bzero with a call to        memset
      make      cd ..





PNG


      cd ImageMagick-      gunzip -c zlib-1.0.4.tar.gz | tar xvf -
      cd zlib
      make      cd ...      gunzip -c libpng-0.96.tar.gz | tar xvf -      mv libpng-0.96 png      cd png
      make      cd ..




TIFF


      cd ImageMagick3      gunzip -c tiff-v3.4beta037.tar.Z | tar xvof -      mv tiff-v3.4beta037 tiff
      cd tiff      configure
      make      cd ..




JBIG


      cd ImageMagick4      gunzip -c freetype-current.tar.gz | tar xvof -      mv freetype-current ttf      cd ttf
      make      cd ..



>

If your computer system supports shared libraries you musttype
      make install
#
Finally, perform the following:
      cd ImageMagick>      edit Magick.tmpl and define Has???? as instructed      xmkmf      make Makefiles      make clean
      make
(
If you do not have xmkmf, try
      configure      make clean
      make -k
F
If the compile fails due to a function redefinition it may be thatDeither jpeg/jconfig.h or mpeg/mpeg.h is redefining4const. Fix this problem and try again.H
You can now display images in the HDF, JBIG, JPEG, MPEG, PNG,"TIFF, or TTF format.

J

If you have HDF, JBIG, JPEG, MPEG, PNG, and TIFF sources.installed as directed above, you can also type
      Install sun
J
Substitute the appropriate machine type (aix, hpux, sgi, etc).


0

Back to Contents







VMS Compilation



F

You might want to check the values of certain program definitionsEbefore compiling. Change the definitions of ApplicationDefaults,;DocumentationBrowser, EditorCommand, PostscriptColorDevice,3PrintCommand, and RGBColorDatabase inFmagick/magick.h to suit your local requirements. Next, type.



Type
      @make)      set display/create/node=node_name::
=
where node_name is the DECNET X server to contact.



Finally type:

      display
A
Alternatively, get a zipped distribution (with JPEG, MPEG, TIFF, and XPM) from<ftp.wizards.dupont.com.

O

The VMS JPEG, TIFF, and XPM source libraries are available on:axp.psl.ku.dk in [anonymous.decwindows.lib].



Thanks to O pmoreau@cenaath.cena.dgac.frOfor supplying invaluable help as well as the VMS versions of the JPEG, MPEG,#TIFF, and XPM libraries.


0

Back to Contents







NT Compilation



H

The NT@distribution contains MetroWerks Codewarrior Professional5projects and a Visual C++ workspace (thanks to9Bill Radcliffe) for@compilation. For those who do not have access to CodeWarrior or;Visual C++, the binaries for the command line utilities are enclosed.

$

If you have an NT X server likeMExceed you will also need to include



    SET DISPLAY=:0
;
in Autoexec.bat and restart your computer. See0BTechnical Window System and OSF/Motif WWW Sites for a list of;commercial and free X server software. Without an X server:you can still display or0animate to, or@import from, a remote X server.*Convert,*mogrify,*montage,.combine, andFidentify, will work with or without-an X server directly from the command prompt.

F

Import does not seem to work with Exceed. Try



    convert x:root image.gif
instead.

G

The pre-compiled NT binaries expect to find Ghostscript asMc:/gs/gswin32.exe. Otherwise, you will be unable to convert or viewPostscript documents.

6

To compile the source with Codewarrior, start withOMagick/Magick.mcp and then animate.mcp, convert.mcp,Fetc.. The Visual C++ workspace is MagickApps/MagickApps.dsw.

;

And yes, the NT executables will work under Windows 95.





0

Back to Contents







Macintosh Compilation



P

The Macintosh6Macintosh distribution contains MetroWerks CodewarriorAProfessional projects for compilation. For those who do not haveBaccess to CodeWarrior, the binaries for the command line utilitiesAare enclosed. I had to comment the inline intrinsic functions inKmath.h in order to compile. If you have a better solution, let meknow.1Display,5animate, and.import'currently do not work on the Macintosh.

&

I'm looking for a volunteer to get4Display andJanimate to work on the Macintosh.KI also need a volunteer is needed to write a simple Mac program to call the=libMagick routines and display an image in a window.


0

Back to Contents







Animation

=
To prevent color flashing on visuals that have colormaps,=animate(1) creates a single colormap from the image sequence.6This can be rather time consuming. You can speed this;operation up by reducing the colors in the image before youanimate them. UseEmogrify to color reduce the images:
0      mogrify +map -colors 256 scenes/dna.[0-9]*
(Alternatively, you can use a StandardMColormap; or a static, direct, or true color visual.You canKdefine 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:
1      animate -visual truecolor scenes/dna.[0-9]*
B
Image filenames can appear in any order on the command line ifCthe 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 imageBformat to MIFF by using the "scene" option with any filter.6Be sure to choose a scene number other than zero. ForKexample, to convert a TIFF image to a MIFF image as scene #2,type:
,      convert -scene 2 image.tiff image.miff



0

Back to Contents







16-BIT Imaging

H
By default, ImageMagick uses a color depth of 8 bits (e.g. [0..255]Mfor each of red, green, blue, and transparency components). Any 16-bit imageNis scaled immediately to 8-bits before any image viewing or processing occurs.GIf you want to work directly with 16-bit images (e.g. [0..65535]), editMMagick.tmpl or Makefile.in and define QuantumLeap0as instructed in the respective file. Next type



    make clean    make


BIn 16-bit mode expect to use about 33% more memory on the average.6Also expect some processing to be slower than in 8-bit(mode (e.g. Oil Painting, Segment, etc).

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



0

Back to Contents







64-BIT Machines

A
Each pixel, within ImageMagick, is represented by theDRunlengthPacket structure found in magick/image.h.EOnly 8 bits are required for each color component and 16 bits for theJcolormap index for a total of 6 bytes. If QuantumLeap is definedM(see 16-BIT IMAGING above), the color component size increases to 16 bits forFa total of 10 bytes. Some 64-bit machines pad the structure which can>cause a significant waste of memory. For the cray, change the*RunlengthPacket structure to this



#    typedef struct _RunlengthPacket    {      unsigned char        red : QuantumDepth,        green : QuantumDepth,        blue : QuantumDepth,        length : QuantumDepth;      unsigned short        index : 16;    } RunlengthPacket;


before compiling.

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





0

Back to Contents







MIFF Image Format

N
MIFF is an image format which I developed.I like it because



    ;
  1. It is machine independent. It can be read on virtually4 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 mostly7 uniform colors have a high compression ratio and4 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.

    8

  5. MIFF computes a digital signature for images.+ This is useful for comparing images.M If two image files have the same signature, they are identical images.

    A

  6. There is a montage keyword allowing an image to act asB 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 Xwindow using the @import program. Alternatively,Jtype the necessary header information in a file with a text editor. Next,7dump 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 :
E
The image file would have red, green, blue tuples (rgbrgbrgb...). Refer to theGdisplay manual page for more details.


0

Back to Contents







Copyright

7
Copyright 1997 E. I. du Pont de Nemours and Company:Permission to use, copy, modify, distribute, and sell this8software and its documentation for any purpose is hereby6granted without fee, provided that the above copyright8notice appear in all copies and that both that copyright6notice and this permission notice appear in supporting4documentation, and that the name of E. I. du Pont de1Nemours and Company not be used in advertising or4publicity pertaining to distribution of the software:without specific, written prior permission. E. I. du Pont9de Nemours and Company makes no representations about the4suitability of this software for any purpose. It is5provided "as is" without express or implied warranty.

6

E. I. du Pont de Nemours and Company disclaims all6warranties with regard to this software, including all8implied warranties of merchantability and fitness, in no:event shall E. I. du Pont de Nemours and Company be liable9for any special, indirect or consequential damages or any6damages whatsoever resulting from loss of use, data or8profits, whether in an action of contract, negligence or6other tortious action, arising out of or in connection-with the use or performance of this software.


2Home PageIImage manipulation software that works like magic.