1MIFF(4)                    Kernel Interfaces Manual                    MIFF(4)
2
3
4

NAME

6       MIFF - Magick Image File Format
7

SYNOPSIS

9       #include <image.h>
10

DESCRIPTION

12       The Magick Image File Format (MIFF) is a platform-independent format
13       for storing bitmap images.  MIFF is a part of the ImageMagick toolkit
14       of image manipulation utilities for the X Window System.  ImageMagick
15       is capable of converting many different image file formats to and from
16       MIFF (e.g. JPEG, XPM, TIFF, etc.).
17
18       A MIFF image file consist of two sections.  The first section is a
19       header composed of keys describing the image in text form.  The next
20       section is the binary image data.  The header is separated from the
21       image data by a : character immediately followed by a newline.
22
23       The MIFF header is composed entirely of LATIN-1 characters.  The fields
24       in the header are key and value combination in the key=value format,
25       with each key and value separated by an equal sign (=).  Each key=value
26       combination is delimited by at least one control or whitespace charac‐
27       ter.  Comments may appear in the header section and are always delim‐
28       ited by braces.  The MIFF header always ends with a colon (:) charac‐
29       ter, followed by a ctrl-Z character.  It is also common to proceed the
30       colon with a formfeed and a newline character.  The formfeed prevents
31       the listing of binary data when using more(1) under Unix where the
32       ctrl-Z has the same effect with the type command on the Win32 command
33       line.
34
35       The following is a list of key=value combinations that may be found in
36       a MIFF file:
37
38       background-color=color
39              border-color=color matte-color=color these optional keys
40              reflects the image background, border, and matte colors respec‐
41              tively. A color can be a name (e.g. white) or a hex value (e.g.
42              #ccc).
43
44       class=DirectClass
45              class=PseudoClass the type of binary image data stored in the
46              MIFF file.  If this key is not present, DirectClass image data
47              is assumed.
48
49       colors=value
50              the number of colors in a DirectClass image. For a PseudoClass
51              image, this key specifies the size of the colormap.  If this key
52              is not present in the header, and the image is PseudoClass, a
53              linear 256 color grayscale colormap is used with the image data.
54              The maximum number of colormap entries is 65535.  col‐
55              orspace=CMYK the colorspace of the pixel data.  The default is
56              RGB.
57
58       columns=value
59              the width of the image in pixels.  This is a required key and
60              has no default.
61
62       compression=BZip
63              compression=Fax compression=JPEG compression=LZW compression=RLE
64              compression=Zip the type of algorithm used to compress the image
65              data.  If this key is not present, the image data is assumed to
66              be uncompressed.
67
68       delay <1/100ths of a second>
69              the interframe delay in an image sequence.  The maximum delay is
70              65535.
71
72       depth=8
73              depth=16 the depth of a single color value representing values
74              from 0 to 255 (depth 8) or 65535 (depth 16).  If this key is
75              absent, a depth of 8 is assumed.
76
77       dispose value
78              GIF disposal method.
79
80              Here are the valid methods:
81
82                   0  No disposal specified.
83                   1  Do not dispose between frames.
84                   2  Overwrite frame with background color from header.
85                   3  Overwrite with previous frame.
86
87       gamma=value
88              the gamma of the image.  If it is not specified, a gamma of 1.0
89              (linear brightness response) is assumed,
90
91       id=ImageMagick
92              identifies the file as a MIFF-format image file.  This key is
93              required and has no default.  Although this key can appear any‐
94              where in the header, it should start as the first key of the
95              header in column 1.  This will allow programs like file(1) to
96              easily identify the file as MIFF.
97
98       iterations value
99              the number of times an image sequence loops before stopping.
100
101       label={value}
102              defines a short title or caption for the image.  If any white‐
103              space appears in the label, it must be enclosed within braces.
104
105       matte=True
106              matte=False specifies whether a DirectClass image has matte
107              data.  Matte data is generally useful for image compositing.
108              This key has no meaning for pseudo-color images.
109
110       montage=<width>x<height>{+-}<x offset>{+-}<y offset>
111              size and location of the individual tiles of a composite image.
112              See X(1) for details about the geometry specification.
113
114              Use this key when the image is a composite of a number of dif‐
115              ferent tiles.  A tile consists of an image and optionally a bor‐
116              der and a label.  <width> is the size in pixels of each individ‐
117              ual tile in the horizontal direction and <height> is the size in
118              the vertical direction.  Each tile must have an equal number of
119              pixels in width and equal in height.  However, the width can
120              differ from the height.  <x offset> is the offset in number of
121              pixels from the vertical edge of the composite image where the
122              first tile of a row begins and <y offset> is the offset from the
123              horizontal edge where the first tile of a column begins.
124
125              If this key is specified, a directory of tile names must follow
126              the image header.  The format of the directory is explained
127              below.
128
129       page=value
130              preferred size and location of an image canvas.
131
132       profile-icc=value
133              the number of bytes in the International Color Consortium color
134              profile.  The profile is defined by the ICC profile specifica‐
135              tion located at ftp://sgigate.sgi.com/pub/icc/icc34.ps.
136
137       colorspace=RGB
138
139       red-primary=x,y
140              green-primary=x,y blue-primary=x,y white-point=x,y this optional
141              key reflects the chromaticity primaries and white point.
142
143       rendering-intent=saturation
144              rendering-intent=perceptual rendering-intent=absolute rendering-
145              intent=relative Rendering intent is the CSS-1 property that has
146              been defined by the International Color Consortium
147              (http://www.color.org).
148
149       resolution=<x-resolution>x<y-resolution>
150              vertical and horizontal resolution of the image.  See units for
151              the specific resolution units (e.g. pixels per inch).
152
153       rows=value
154              the height of the image in pixels.  This is a required key and
155              has no default.
156
157       scene=value
158              the sequence number for this MIFF image file.  This optional key
159              is used when a MIFF image file is one in a sequence of files
160              used in an animation.
161
162       signature=value
163              this optional key contains a string that uniquely identifies the
164              image pixel contents.  NIST's SHA-256 message digest algorithm
165              is recommended.
166
167       units=pixels-per-inch
168              units=pixels-per-centimeter image resolution units.
169
170              Other key value pairs are permitted.  If a value contains white‐
171              space it must be enclosed with braces as illustrated here:
172
173                  id=ImageMagick
174                  class=PseudoClass  colors=256
175                  compression=RunlengthEncoded  packets=27601
176                  columns=1280  rows=1024
177                  signature=d79e1c308aa5bbcdeea8ed63df412da9
178                  copyright={Copyright (c) 2001 ImageMagick Studio}
179                  <FF>
180                  :
181
182
183       Note that key=value combinations may be separated by newlines or spaces
184       and may occur in any order within the header.  Comments (within braces)
185       may appear anywhere before the colon.
186
187       If you specify the montage key in the header, follow the header with a
188       directory of image tiles.  This directory consists of a name for each
189       tile of the composite image separated by a newline character.  The list
190       is terminated with a NULL character.
191
192       If you specify the color-profile key in the header, follow the header
193       (or montage directory if the montage key is in the header) with the
194       binary color profile.
195
196       Next comes the binary image data itself.  How the image data is format‐
197       ted depends upon the class of the image as specified (or not specified)
198       by the value of the class key in the header.
199
200       DirectClass images (class=DirectClass) are continuous-tone, images
201       stored as RGB (red, green, blue), RGBA (red, green, blue, alpha), or
202       CMYK (cyan, yellow, magenta, black) intensity values as defined by the
203       colorspace key. Each intensity value is one byte in length for images
204       of depth 8 (0..255), whereas, images of depth 16 (0..65535) require two
205       bytes in most significant byte first order.
206
207       PseudoClass images (class=PseudoClass) are colormapped RGB images. The
208       colormap is stored as a series of red, green, and blue pixel values,
209       each value being a byte in size. If the image depth is 16, each col‐
210       ormap entry consumes two bytes with the most significant byte being
211       first. The number of colormap entries is defined by the colors key.
212       The colormap data occurs immediately following the header (or image
213       directory if the montage key is in the header). PseudoClass image data
214       is an array of index values into the color map. If there are 256 or
215       fewer colors in the image, each byte of image data contains an index
216       value. If the image contains more than 256 colors or the image depth is
217       16, the index value is stored as two contiguous bytes with the most
218       significant byte being first. If matte is true, each colormap index is
219       followed by a 1 or 2-byte alpha value.
220
221       The image data in a MIFF file may be uncompressed, runlength encoded,
222       Zip compressed, or BZip compressed. The compression key in the header
223       defines how the image data is compressed. Uncompressed pixels are just
224       stored one scanline at a time in row order. Runlength encoded compres‐
225       sion counts runs of identical adjacent pixels and stores the pixels
226       followed by a length byte (the number of identical pixels minus 1). Zip
227       and BZip compression compresses each row of an image and preceeds the
228       compressed row with the length of compressed pixel bytes as a word in
229       most significant byte first order.
230
231       MIFF files may contain more than one image.  Simply concatenate each
232       individual image (composed of a header and image data) into one file.
233

SEE ALSO

235       display(1), animate(1), import(1), montage(1), mogrify(1), convert(1),
236       more(1), compress(1)
237
239       Copyright (C) 2000 ImageMagick Studio, a non-profit organization dedi‐
240       cated to making software imaging solutions freely available.
241
242       Permission is hereby granted, free of charge, to any person obtaining a
243       copy of this software and associated documentation files ("ImageMag‐
244       ick"), to deal in ImageMagick without restriction, including without
245       limitation the rights to use, copy, modify, merge, publish, distribute,
246       sublicense, and/or sell copies of ImageMagick, and to permit persons to
247       whom the ImageMagick is furnished to do so, subject to the following
248       conditions:
249
250       The above copyright notice and this permission notice shall be included
251       in all copies or substantial portions of ImageMagick.
252
253       The software is provided "as is", without warranty of any kind, express
254       or implied, including but not limited to the warranties of mer‐
255       chantability, fitness for a particular purpose and noninfringement.  In
256       no event shall ImageMagick Studio be liable for any claim, damages or
257       other liability, whether in an action of contract, tort or otherwise,
258       arising from, out of or in connection with ImageMagick or the use or
259       other dealings in ImageMagick.
260
261       Except as contained in this notice, the name of the ImageMagick Studio
262       shall not be used in advertising or otherwise to promote the sale, use
263       or other dealings in ImageMagick without prior written authorization
264       from the ImageMagick Studio.
265

AUTHORS

267       John Cristy, ImageMagick Studio
268
269
270
271ImageMagick                         $Date$                             MIFF(4)
Impressum