>K ø + Z D ImageMagick - Image Processing and Display Package9VL



J

Magick 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.ImageMagickFis capable of converting many different image file formats to 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.
I


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 (=). Eachkeyword=valueIcombination is delimited by at least one control or whitespace character.MComments may appear in the header section and are always delimited by braces.GThe MIFF header always ends with a colon (:) character, followed by a9ctrl-Z character. It is also common to proceed thePcolon with a formfeed and a newline character. The formfeedHprevents the listing of binary data when using more(1) under UnixHwhere the ctrl-Z has the same effect with the type commandon 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 matteGcolors respectively. A color can be a name (e.g. white) or a hexvalue (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 linear>256 color grayscale colormap is used with the image data.
4
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.

2delay <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.

Xmontage=<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.F<width> is the size in pixels of each individual tile in theGhorizontal direction and <height> is the size in the verticalKdirection. Each tile must have an equal number of pixels in width and equalMin height. However, the width can differ from the height. <xoffset>Iis the offset in number of pixels from the vertical edge of the compositeIimage where the first tile of a row begins and <yoffset> is theMoffset from the horizontal edge where the first tile of 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.

Aresolution=<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.


GOther key value pairs are permitted. If a value contains whitespace it1must be enclosed with braces as illustrated here:2
      id=ImageMagickA      class=PseudoClass  colors=256G      compression=RunlengthEncoded  ;      columns=1280  rows=1024&      scene=1I      signature=d79e1c308aa5bbcdeea8ed63df412da9P      copyright={Copyright (c) 2000 ImageMagick Studio}&      <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,Himages stored as RGB (red, green, blue), RGBA (red, green, blue, alpha),Ior CMYK (cyan, yellow, magenta, black) intensity values as defined by thecolorspaceGkeyword. Each intensity value is one byte in length for images of depthG8 (0..255), whereas, images of depth 16 (0..65535) require two bytes in"most significant byte first order.I

PseudoClass images (class=PseudoClass) are colormapped RGBHimages. The colormap is stored as a series of red, green, and blue pixelGvalues, each value being a byte in size. If the image depth is 16, eachFcolormap entry consumes two bytes with the most significant byte beingNfirst. 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).PseudoClass imageHdata is an array of index values into the color map. If there are 256 orKfewer colors in the image, each byte of image data contains an index value.HIf the image contains more than 256 colors or the image depth is 16, theGindex value is stored as two contiguous bytes with the most significantJbyte being first. If matte is true, each colormap index is followedby a 1 or 2-byte alpha value.F

The image data in a MIFF file may be uncompressed, runlengthIencoded, Zip compressed,Wor BZip compressed. The compressionLkeyword in the header defines how the image data is compressed. UncompressedMpixels are just stored one scanline at a time in row order. Runlength encodedJcompression counts runs of identical adjacent pixels and stores the pixelsGfollowed by a length byte (the number of identical pixels minus 1). ZipPand BZip compression compresses each row of an image and preceeds the compressedKrow with the length of compressed pixel bytes as a word in most significantbyte 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


qJohn Cristy, magick@wizards.dupont.comImageMagickStudio.

 

 

Ù
>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 shallGImageMagick Studio be liable for any claim, damages or other liability,Fwhether in an action of contract, tort or otherwise, arising from, outZof or in connection with ImageMagick or the use or other dealings in 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>Image manipulation software that works like magic.