<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="description" content="ImageMagick, version 5.1.1, is a    robust collection of tools and libraries to read, write, and manipulate    an image in any of the more popular image formats including GIF, JPEG,    PNG, PDF, and Photo CD.  With ImageMagick you can create GIFs dynamically    making it suitable for Web applications.  You can also resize, rotate,    sharpen, color reduce, or add special effects to an image and save your    completed work in the same or  differing image format.">
   <meta name="keywords" content="ImageMagick, Image Magick, Image Magic,    PerlMagick, Perl Magick, Perl Magic, CineMagick, PixelMagick, Pixel Magic,    WebMagick, Web Magic, visualization, image processing, software     development, simulation, image, software, AniMagick, Animagic,    Magick++">
   <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; U; SunOS 5.6 sun4u) [Netscape]">
   <title>ImageMagick - Image Processing and Display Package</title>
<link rev="made" href="mailto:magick@wizards.dupont.com">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#1F00FF" vlink="#9900DD" alink="#FF0000">

<center><img SRC="../images/magick_small.png" height=125 width=121></center>

<p><br>
<p><b>Magick Image File Format (MIFF)</b> is a platform-independent format
for storing bitmap images. <b>MIFF</b> is a part of the
<a href="../ImageMagick.html">ImageMagick</a>
toolkit of image manipulation utilities for the <i>X Window System</i>.
<b>ImageMagick</b>
is capable of converting many different image file formats to and from
<b>MIFF</b> (<i>e.g.</i> <b>JPEG, XPM, TIFF,</b> <i>etc.</i>).
<dl>
<h2>
<a NAME="desc"></a></h2>

<table BORDER=0 WIDTH="100%" >
<tr>
<td ALIGN=LEFT BGCOLOR="#52799E"><img SRC="../images/right_triangle.png" ALT=">" BORDER=0 height=14 width=15><b><font face="Helvetica, Arial"><font color="#FFFFFF"><font size=+1>Description</font></font></font></b></td>
</tr>
</table>

<dd>
A <b>MIFF</b> image file consist of two sections. The first section is
a header composed of keywords describing the image in text form. The next
section is the binary image data. The header is separated from the image
data by a <tt>:</tt> character immediately followed by a <i>ctrl-Z</i>.</dd>

<p><br>The <b>MIFF</b> header is composed entirely of LATIN-1 characters.
The fields in the header are keyword and value combination in the <i>keyword</i>=<i>value</i>
format, with each keyword and value separated by an equal sign (=). Each
<i>keyword</i>=<i>value</i>
combination is delimited by at least one control or whitespace character.
Comments may appear in the header section and are always delimited by braces.
The <b>MIFF</b> header always ends with a colon (<tt>:</tt>) character,
followed by a
<i>ctrl-Z</i> character. It is also common to proceed the
colon with a <i>formfeed</i> and a <i>newline</i> character. The <i>formfeed</i>
prevents the listing of binary data when using <b>more(1)</b> under Unix
where the <i>ctrl-Z</i> has the same effect with the <b>type</b> command
on the Win32 command line.
<p>The following is a list of <i>keyword</i>=<i>value</i> combinations
that may be found in a <b>MIFF</b> file:
<dl>
<dl>
<dt>
<b>background-color</b>=<i>color</i></dt>

<dt>
<b>border-color</b>=<i>color</i></dt>

<dt>
<b>matte-color</b>=<i>color</i></dt>

<dd>
these optional keywords reflects the image background, border, and matte
colors respectively. A color can be a name (e.g. <i>white</i>) or a hex
value (e.g. <i>#ccc</i>).</dd>

<dt>
<b>class</b>=<i>DirectClass</i></dt>

<dt>
<b>class</b>=<i>PseudoClass</i></dt>

<dd>
the type of binary image data stored in the <b>MIFF</b> file. If this keyword
is not present, <i>DirectClass</i> image data is assumed.</dd>

<dt>
<b>colors</b>=<i>value</i></dt>

<dd>
the number of colors in a <i>DirectClass</i> image. For a <i>PseudoClass</i>
image, this keyword specifies the size of the colormap. If this keyword
is not present in the header, and the image is <i>PseudoClass</i>, a linear
256 color grayscale colormap is used with the image data.</dd>

<br>The maximum number of colormap entries is 65535.
<dt>
<b>columns</b>=<i>value</i></dt>

<dd>
the width of the image in pixels. This is a required keyword and has no
default.</dd>

<dt>
<b>color-profile</b>=<i>value</i></dt>

<dd>
the number of bytes in the International Color Consortium color profile.
The profile is defined by the <a href="ftp://sgigate.sgi.com/pub/icc/icc34.ps">ICC
profile specification</a>.</dd>

<dt>
<b>colorspace</b>=<i>RGB</i></dt>

<dt>
<b>colorspace</b>=<i>CMYK</i></dt>

<dd>
the colorspace of the pixel data. The default is <i>RGB</i>.</dd>

<dt>
<b>compression</b>=<i>RunlengthEncoded</i></dt>

<dt>
<b>compression</b>=<i>Zip</i></dt>

<dt>
<b>compression</b>=<i>BZip</i></dt>

<dd>
the type of algorithm used to compress the image data. If this keyword
is not present, the image data is assumed to be uncompressed.</dd>

<dt>
<b>delay</b> <i>&lt;1/100ths of a second></i></dt>

<dd>
the interframe delay in an image sequence. The maximum delay is 65535.</dd>

<dt>
<b>depth</b>=<i>8</i></dt>

<dt>
<b>depth</b>=<i>16</i></dt>

<dd>
depth of a single color value representing values from 0 to 255 (depth
8) or 65535 (depth 16). If this keyword is absent, a depth of 8 is assumed.</dd>

<dt>
<b>dispose</b> <i>value</i></dt>

<dd>
GIF disposal method.</dd>

<dd>
Here are the valid methods:</dd>

<pre>&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; No disposal specified.
&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; Do not dispose between frames.
&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; Overwrite frame with background color from header.
&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; Overwrite with previous frame.</pre>

<dt>
<b>gamma</b>=<i>value</i></dt>

<dd>
gamma of the image. If it is not specified, a gamma of 1.0 (linear brightness
response) is assumed,</dd>

<dt>
<b>id</b>=<i>ImageMagick</i></dt>

<dd>
identify the file as a <b>MIFF</b>-format image file. This keyword is required
and has no default. Although this keyword can appear anywhere in the header,
it should start as the first keyword of the header in column 1. This will
allow programs like
<i>file</i>(1) to easily identify the file as <b>MIFF</b>.</dd>

<dt>
<b>iterations</b> <i>value</i></dt>

<dd>
the number of times an image sequence loops before stopping.</dd>

<dt>
<b>label</b>="<i>value</i>"</dt>

<dd>
this optional keyword defines a short title or caption for the image. If
any whitespace appears in the label, it must be enclosed within double
quotes.</dd>

<dt>
<b>matte</b>=<i>True</i></dt>

<dt>
<b>matte</b>=<i>False</i></dt>

<dd>
specifies whether a <i>DirectClass</i> image has matte data. Matte data
is generally useful for image compositing. This keyword has no meaning
for pseudocolor images.</dd>

<dt>
<b>montage</b>=<i>&lt;width>x&lt;height>{+-}&lt;xoffset</i>>{+-}&lt;<i>yoffset</i>></dt>

<dd>
size and location of the individual tiles of a composite image. See <i>X(1)</i>
for details about the geometry specification.</dd>

<dd>
Use this keyword when the image is a composite of a number of different
tiles. A tile consists of an image and optionally a border and a label.
&lt;<i>width</i>> is the size in pixels of each individual tile in the
horizontal direction and &lt;<i>height</i>> is the size in the vertical
direction. Each tile must have an equal number of pixels in width and equal
in height. However, the width can differ from the height. &lt;<i>xoffset</i>>
is the offset in number of pixels from the vertical edge of the composite
image where the first tile of a row begins and &lt;<i>yoffset</i>> is the
offset from the horizontal edge where the first tile of a column begins.</dd>

<dd>
If this keyword is specified, a directory of tile names must follow the
image header. The format of the directory is explained below.</dd>

<dt>
<b>page</b>=<i>value</i></dt>

<dd>
preferred size and location of an image canvas.</dd>

<dt>
<b>red-primary</b>=<i>x,y</i></dt>

<dt>
<b>green-primary</b>=<i>x,y</i></dt>

<dt>
<b>blue-primary</b>=<i>x,y</i></dt>

<dt>
<b>white-point</b>=<i>x,y</i></dt>

<dd>
this optional keyword reflects the chromaticity primaries and white point.</dd>

<dt>
<b>rendering-intent</b>=<i>saturation</i></dt>

<dt>
<b>rendering-intent</b>=<i>perceptual</i></dt>

<dt>
<b>rendering-intent</b>=<i>absolute</i></dt>

<dt>
<b>rendering-intent</b>=<i>relative</i></dt>

<dd>
Rendering intent is the CSS-1 property that has been defined by the
<a href="http://www.color.org">International
Color Consortium</a>.</dd>

<dt>
<b>resolution</b>=<i>&lt;x-resolution>x&lt;y-resolution></i></dt>

<dd>
vertical and horizontal resolution of the image. See <b>units</b> for the
specific resolution units (e.g. pixels per inch).</dd>

<dt>
<b>rows</b>=<i>value</i></dt>

<dd>
the height of the image in pixels. This is a required keyword and has no
default.</dd>

<dt>
<b>scene</b>=<i>value</i></dt>

<dd>
the sequence number for this <b>MIFF</b> image file. This optional keyword
is used when a <b>MIFF</b> image file is one in a sequence of files used
in an animation.</dd>

<dt>
<b>signature</b>=<i>value</i></dt>

<dd>
this optional keyword contains a string that uniquely identifies the image
pixel contents. RSA's Data Security MD5 Digest Algorithm is recommended.</dd>

<dt>
<b>units</b>=<i>pixels-per-inch</i></dt>

<dt>
<b>units</b>=<i>pixels-per-centimeter</i></dt>

<dd>
image resolution units.</dd>
</dl>
</dl>
The following is a sample <b>MIFF</b> header. In this example, &lt;FF>
is a formfeed character:
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id=ImageMagick
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class=PseudoClass&nbsp; colors=256
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; compression=RunlengthEncoded&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; columns=1280&nbsp; rows=1024
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scene=1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; signature=d79e1c308aa5bbcdeea8ed63df412da9
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Rendered via Dore by Sandi Tennyson.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;FF>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :</pre>
Note that <i>keyword</i>=<i>value</i> combinations may be separated by
newlines or spaces and may occur in any order within the header. Comments
(within braces) may appear anywhere before the colon.
<p>If you specify the <b>montage</b> keyword in the header, follow the
header with a directory of image tiles. This directory consists of a name
for each tile of the composite image separated by a <b>newline</b> character.
The list is terminated with a NULL character.
<p>If you specify the <b>color-profile</b> keyword in the header, follow
the header (or montage directory if the <b>montage</b> keyword is in the
header) with the binary color profile.
<p>Next comes the binary image data itself. How the image data is formatted
depends upon the class of the image as specified (or not specified) by
the value of the <b>class</b> keyword in the header.
<p><b>DirectClass</b> images (<tt>class=DirectClass</tt>) are continuous-tone,
images stored as RGB (red, green, blue), RGBA (red, green, blue, alpha),
or CMYK (cyan, yellow, magenta, black) intensity values as defined by the
<b>colorspace</b>
keyword. Each intensity value is one byte in length for images of depth
8 (0..255), whereas, images of depth 16 (0..65535) require two bytes in
most significant byte first order.
<p><b>PseudoClass</b> images (<tt>class=PseudoClass</tt>) are colormapped
<b>RGB</b>
images. The colormap is stored as a series of red, green, and blue pixel
values, each value being a byte in size. If the image depth is 16, each
colormap entry consumes two bytes with the most significant byte being
first. The number of colormap entries is defined by the <b>colors</b> keyword.
The colormap data occurs immediately following the header (or image directory
if the <b>montage</b> keyword is in the header).
<b>PseudoClass</b> image
data is an array of index values into the color map. If there are 256 or
fewer colors in the image, each byte of image data contains an index value.
If the image contains more than 256 colors or the image depth is 16, the
index value is stored as two contiguous bytes with the most significant
byte being first. If <b>matte</b> is true, each colormap index is followed
by a 1 or 2-byte alpha value.
<p>The image data in a <b>MIFF</b> file may be uncompressed, runlength
encoded, <a href="ftp://ftp.uu.net/graphics/png/src/">Zip</a> compressed,
or <a href="http://www.muraroa.demon.co.uk">BZip</a> compressed. The <b>compression</b>
keyword in the header defines how the image data is compressed. Uncompressed
pixels are just stored one scanline at a time in row order. Runlength encoded
compression counts runs of identical adjacent pixels and stores the pixels
followed by a length byte (the number of identical pixels minus 1). Zip
and BZip compression compresses each row of an image and preceeds the compressed
row with the length of compressed pixel bytes as a word in most significant
byte first order.
<p><b>MIFF</b> files may contain more than one image. Simply concatenate
each individual image (composed of a header and image data) into one file.</dl>

<p><br><a NAME="auth"></a>
<table BORDER=0 WIDTH="100%" >
<tr>
<td ALIGN=LEFT BGCOLOR="#52799E"><img SRC="../images/right_triangle.png" ALT=">" BORDER=0 height=14 width=15><b><font face="Helvetica, Arial"><font color="#FFFFFF"><font size=+1>Authors</font></font></font></b></td>
</tr>
</table>

<dd>
<i>John Cristy</i>, <i><a href="mailto:magick@wizards.dupont.com">magick@wizards.dupont.com</a></i><b>ImageMagick
Studio</b>.</dd>

<br>&nbsp;
<p>&nbsp;
<dl><a NAME="copy"></a>
<table BORDER=0 WIDTH="100%" >
<tr>
<td ALIGN=LEFT BGCOLOR="#52799E"><img SRC="../images/right_triangle.png" ALT=">" BORDER=0 height=14 width=15><b><font face="Helvetica, Arial"><font color="#FFFFFF"><font size=+1>Copyright</font></font></font></b></td>
</tr>
</table>

<dd>
<b>Copyright (C) 2000 ImageMagick Studio</b></dd>

<dd>
<b>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:</b></dd>

<dd>
<b>The above copyright notice and this permission notice shall be included
in all copies or substantial portions of ImageMagick.</b></dd>

<dd>
<b>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.</b></dd>

<dd>
<b>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.</b></dd>
</dl>

<dl>
<hr>
<p><a href="../ImageMagick.html"><img SRC="../images/home.png" ALT="Home Page" BORDER=0 height=40 width=40 align=CENTER></a><font size=-2>
Image manipulation software that works like magic.</font></dl>

</body>
</html>
