=J D H C ImageMagick - Image Processing and Display Package; C
M MIFF



GMagick Image File Format (MIFF) is a platform-independent format7for storing bitmap images. MIFF is a part of the-ImageMagickGtoolkit of image manipulation utilities for the X Window System.MImageMagick is capable of converting many different image file formatsJto and from MIFF (e.g. JPEG, XPM, TIFF, etc.).





Ý
>Description




FA MIFF image file consist of two sections. The first section isIa header composed of keywords describing the image in text form. The nextHsection is the binary image data. The header is separated from the imageLdata by a : character immediately followed by a ctrl-Z.
E

The MIFF header is composed entirely of LATIN-1 characters.]The fields in the header are keyword and value combination in the keyword=valueHformat, with each keyword and value separated by an equal sign (=). EachLkeyword=value combination is delimited by at least one controlFor whitespace character. Comments may appear in the header section andGare always delimited by braces. The MIFF header always ends with-a colon (:) character, followed by actrl-Z character.RIt is also common to proceed the colon with a formfeed and a newlineGcharacter. The formfeed prevents the listing of binary data whenKusing more(1) under Unix where the ctrl-Z has the same effect7with the type command on the Win32 command line.F

The following is a list of keyword=value combinations(that may be found in a MIFF file:






)background-color=color

%border-color=color

$matte-color=color

Hthese optional keywords reflects the image background, border, and matteDcolors respectively. A color can be a name (e.g. white) or a"hex value (e.g. #ccc).


$class=DirectClass

$class=PseudoClass

Mthe type of binary image data stored in the MIFF file. If this keyword>is not present, DirectClass image data is assumed.


colors=value

Lthe number of colors in a DirectClass image. For a PseudoClassGimage, this keyword specifies the size of the colormap. If this keywordKis not present in the header, and the image is PseudoClass, a linearK256 color grayscale colormap is used with the image data.
The maximum$number of colormap entries is 65535.

columns=value

Gthe width of the image in pixels. This is a required keyword and has no default.


&color-profile=value

Hthe number of bytes in the International Color Consortium color profile.RThe profile is defined by the ICCprofile specification.


!colorspace=RGB

"colorspace=CMYK

Athe colorspace of the pixel data. The default is RGB.


/compression=RunlengthEncoded

"compression=Zip

#compression=BZip

Fthe type of algorithm used to compress the image data. If this keywordBis not present, the image data is assumed to be uncompressed.


5delay <1/100ths of a second>

Kthe interframe delay in an image sequence. The maximum delay is 65535.


depth=8

depth=16

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


dispose value

GIF disposal method.

Here are the valid methods:
<
  0     No disposal specified.?  1     Do not dispose between frames.S  2     Overwrite frame with background color from header.E  3     Overwrite with previous frame.


gamma=value

Mgamma of the image. If it is not specified, a gamma of 1.0 (linear brightnessresponse) is assumed,


!id=ImageMagick

Nidentify the file as a MIFF-format image file. This keyword is requiredLand has no default. Although this keyword can appear anywhere in the header,Iit should start as the first keyword of the header in column 1. This willallow programs like?file(1) to easily identify the file as MIFF.


#iterations value

Athe number of times an image sequence loops before stopping.


label="value"

Hthis optional keyword defines a short title or caption for the image. IfFany whitespace appears in the label, it must be enclosed within double quotes.


matte=True

matte=False

Gspecifies whether a DirectClass image has matte data. Matte dataFis generally useful for image compositing. This keyword has no meaningfor pseudocolor images.


Umontage=<width>x<height>{+-}<xoffset>{+-}<yoffset>

Osize and location of the individual tiles of a composite image. See X(1)2for details about the geometry specification.

GUse this keyword when the image is a composite of a number of differentGtiles. A tile consists of an image and optionally a border and a label.I<width> is the size in pixels of each individual tile in theJhorizontal direction and <height> is the size in the verticalKdirection. Each tile must have an equal number of pixels in width and equalFin height. However, the width can differ from the height. <xJoffset> is the offset in number of pixels from the vertical edgeLof the composite image where the first tile of a row begins and <yMoffset> is the offset from the horizontal edge where the first tileof a column begins.

GIf this keyword is specified, a directory of tile names must follow theBimage header. The format of the directory is explained below.


page=value

4preferred size and location of an image canvas.


"red-primary=x,y

$green-primary=x,y

#blue-primary=x,y

"white-point=x,y

Othis optional keyword reflects the chromaticity primaries and white point.


.rendering-intent=saturation

.rendering-intent=perceptual

,rendering-intent=absolute

,rendering-intent=relative

CRendering intent is the CSS-1 property that has been defined by the,InternationalColor Consortium.


Gresolution=<x-resolution>x<y-resolution>

Ivertical and horizontal resolution of the image. See units for the6specific resolution units (e.g. pixels per inch).


rows=value

Hthe height of the image in pixels. This is a required keyword and has no default.


scene=value

Jthe sequence number for this MIFF image file. This optional keywordHis used when a MIFF image file is one in a sequence of files usedin an animation.


"signature=value

Jthis optional keyword contains a string that uniquely identifies the imageMpixel contents. RSA's Data Security MD5 Digest Algorithm is recommended.


(units=pixels-per-inch

.units=pixels-per-centimeter

image resolution units.




IThe following is a sample MIFF header. In this example, <FF>is a formfeed character:2

      id=ImageMagickA      class=PseudoClass  colors=256B      compression=RunlengthEncoded  ;      columns=1280  rows=1024&      scene=1I      signature=d79e1c308aa5bbcdeea8ed63df412da9       {U         Rendered via Dore by Sandi Tennyson.       })      <FF>&      :
FNote that keyword=value combinations may be separated byInewlines or spaces and may occur in any order within the header. Comments5(within braces) may appear anywhere before the colon.F

If you specify the montage keyword in the header, follow theIheader with a directory of image tiles. This directory consists of a nameMfor each tile of the composite image separated by a newline character.-The list is terminated with a NULL character.H

If you specify the color-profile keyword in the header, followHthe header (or montage directory if the montage keyword is in the&header) with the binary color profile.K

Next comes the binary image data itself. How the image data is formattedFdepends upon the class of the image as specified (or not specified) by4the value of the class keyword in the header.N

DirectClass images (class=DirectClass) are continuous-tone,Kimages stored as RGB (red, green, blue), RGBA (red, green, blue, alpha), orFCMYK (cyan, yellow, magenta, black) intensity values as defined by the0colorspace keyword. Each intensity valueNis one byte in length for images of depth 8 (0..255), whereas, images of depthE16 (0..65535) require two bytes in most significant byte first order.I

PseudoClass images (class=PseudoClass) are colormappedMRGB images. The colormap is stored as a series of red, green, and blueHpixel values, each value being a byte in size. If the image depth is 16,Keach colormap entry consumes two bytes with the most significant byte beingOfirst. The number of colormap entries is defined by the colors keyword.MThe colormap data occurs immediately following the header (or image directory0if the montage keyword is in the header).HPseudoClass image data is an array of index values into the colorFmap. If there are 256 or fewer colors in the image, each byte of imageHdata contains an index value. If the image contains more than 256 colorsPor the image depth is 16, the index value is stored as two contiguous bytes withEthe most significant byte being first. If matte is true, each8colormap index is followed by a 1 or 2-byte alpha value.<

The image data in a MIFF file may be uncompressed,Hrunlength encoded, Zip Lcompressed, or BZip compressed.JThe compression keyword in the header defines how the image data isNcompressed. Uncompressed pixels are just stored one scanline at a time in rowNorder. Runlength encoded compression counts runs of identical adjacent pixels?and stores the pixels followed by a length byte (the number of Eidentical pixels minus 1). Zip and BZip compression compresses each ?row of an image and preceeds the compressed row with the lengthIof compressed pixel bytes as a word in most significant byte first order.H

MIFF files may contain more than one image. Simply concatenateOeach individual image (composed of a header and image data) into one file.




Ù
>Authors




cJohn Cristy, magick@wizards.dupont.com=E.I. du Pont de Nemours and Company Incorporated.





Û
>Copyright




1Copyright (C) 2000 ImageMagick Studio




HPermission is hereby granted, free of charge, to any person obtainingKa copy of this software and associated documentation files ("ImageMagick"),Hto deal in ImageMagick without restriction, including without limitationHthe rights to use, copy, modify, merge, publish, distribute, sublicense,Pand/or sell copies of ImageMagick, and to permit persons to whom the ImageMagickDis furnished to do so, subject to the following conditions:




JThe above copyright notice and this permission notice shall be included>in all copies or substantial portions of ImageMagick.




JThe software is provided "as is", without warranty of any kind, expressKor implied, including but not limited to the warranties of merchantability,Ffitness for a particular purpose and noninfringement.In no event shall6ImageMagick Studio be liable for any claim, damages orMother liability, whether in an action of contract, tort or otherwise, arisingKfrom, out of or in connection with ImageMagick or the use or other dealingsin ImageMagick.




GExcept as contained in this notice, the name of the E. I. du Pont deLNemours and Company shall not be used in advertising or otherwise to promoteRthe sale, use or other dealings in ImageMagick without prior written authorization%from the ImageMagick Studio.




Home Page Image8manipulation software that works like magic.