home *** CD-ROM | disk | FTP | other *** search
- MIFF(5) FILE FORMATS MIFF(5)
-
-
-
- NAME
- MIFF - ImageMagick's file format for raster images.
-
- SYNOPSIS
- #include <image.h>
-
- DESCRIPTION
- A MIFF image file consist of two sections. The first
- section is composed of keywords describing the image in text
- form. The next section is the binary image data. The two
- sections are separated by a : character immediately followed
- by a newline. Generally, the first section has a form-feed
- and newline proceeding the : character. You can then list
- the image keywords with more, without printing the binary
- image that follows the : separator.
-
- Each keyword must be separated by at least one space but can
- be separated with control characters such a form-feed or
- newline.
-
- A list of valid keywords follows:
-
- class=DirectClass | PseudoClass
- identifies the type of binary image stored within the
- file.
-
- This keyword is optional. If it is not specified, a
- DirectClass image format is assumed. An explanation of
- DirectClass and PseudoClass image data follows this
- list.
-
- colors=value
- specifies the number of colors in the image, and for
- pseudo-color images the size of the colormap.
-
- This keyword is optional. However, if a colormap size
- is not specified, a linear colormap is assumed for
- pseudo-color images.
-
- columns=value
- is a required keyword and specifies the number of
- columns, or width in pixels, of the image.
-
- compression=QEncoded | RunlengthEncoded
- identifies how the image stored within the file is
- compressed.
-
- This keyword is optional. If it is not specified, the
- image is assumed to be uncompressed. A detailed
- explanation of runlength-encoded and predictive
- arithmetic image compression follows this list.
-
- id=ImageMagick
- is a required keyword and identifies this file as a
- MIFF image.
-
- packets=value
- specifies the number of compressed color packets in the
- image data section.
-
- This keyword is optional, but recommended, for
- runlength-encoded image compression. It is required
- for arithimetic encoded image compression. A detailed
- explanation of image compression follows this list.
-
- rows=value
- is a required keyword and specifies the number of rows,
- or height in pixels, of the image.
-
- scene=value
- is an optional keyword and is a reference number for
- sequencing of images.
-
- This keyword is typically useful for animating a
- sequence of images.
-
- signature=value
- is an optional keyword and is a character string that
- uniquely identifies the image colormap.
-
- A unique identifier for the colormap is useful for
- animating a sequence of PseudoClass images. The
- default identifier is a digital signature computed from
- RSA's Data Security MD4 Digest Algorithm described in
- RFC 1186, October 1990. The colormap signature is
- generally computed if scene has a value other than
- zero.
-
- Comments can be included in the keyword section. Comments
- must begin with a { character and end with a } character.
-
- An example keyword section follows:
-
- {
- Rendered via Dore by Sandy Hause.
- }
- id=ImageMagick
- class=PseudoClass colors=256
- compression=RunlengthEncoded packets=27601
- columns=1280 rows=1024
- scene=1 signature=d79e1c308aa5bbcdeea8ed63df412da9
- ^L
- :
-
- The binary image data that follows the keyword text is
- stored in one of two binary classes as specified by the
- class keyword: DirectClass or PseudoClass.
-
- Use the DirectClass class to store continuous-tone images.
- DirectClass requires that the image pixels immediately
- follow the keyword text and be stored as binary red, green,
- and blue intensity values. The total number of pixels
- expected is equal to the number of pixel columns times the
- number of pixel rows as specified by the columns and rows
- keywords.
-
- If the compression keyword is not specified, a red, green,
- and blue byte in that order is expected for each pixel of
- the image.
-
- If compression is QEncoded, each red, green, and blue byte
- intensity value is encoded using the predictive arithmetic
- compression algorithm. Use the packets keyword to specify
- the total number of arithimetic encoded packets that
- comprise the image. Refer to "JPEG-9-R6 Working Draft for
- Development of JPEG CD", January 1991, for implementation
- specific details.
-
- If compression is RunlengthEncoded, each red, green, and
- blue byte intensity value is followed by a count byte. This
- value specifies the number of horizonally contiguous pixels
- in the image of that color. The count (0-255) is one less
- than the actual number of contiguous pixels; thus a single
- packet can represent from 1 up to 256 identical pixels. The
- total number of pixels specified by the individual count
- bytes must add up to the number of pixel columns times the
- number of pixel rows as specified by the columns and rows
- keywords. Use packets to specify the total number of
- runlength-encoded packets that comprise the image.
-
- Use the PseudoClass class to store pseudo-color images.
- PseudoClass requires that the image colormap and pseudo-
- color pixels immediately follow the keyword text. The
- colormap is stored as contiguous red, green, and blue
- intensity values. The number of intensity values expected
- is determined by the colors keyword. Note, an image
- colormap is restricted to at most 65535 entries. The binary
- pseudo-color image is stored as indexes into the colormap.
- If the colormap size exceeds 256 entries, then each colormap
- index is two bytes each with the most-significant-byte
- first. The total number of pixels expected is equal to the
- number of pixel columns times the number of pixel rows as
- specified by the columns and rows keywords.
-
- If the compression keyword is not specified, a colormap
- index is expected for each pixel of the image.
-
- If compression is QEncoded, each colormap index is encoded
- using the predictive arithmetic compression algorithm. Use
- the packets keyword to specify the total number of
- arithimetic encoded packets comprise the image. Refer to
- "JPEG-9-R6 Working Draft for Development of JPEG CD",
- January 1991, for implementation specific details.
-
- If compression is RunlengthEncoded, each colormap index is
- followed by a count byte. This value specifies the number
- of horizonally contiguous pixels in the image of that color.
- The count (0-255) is one less than the actual number of
- contiguous pixels; thus a single packet can represent from 1
- up to 256 identical pixels. The total number of pixels
- specified by the individual count bytes must add up to the
- number of pixels expected in the image as specified by the
- columns and rows keywords. Use packets to specify the total
- number of runlength-encoded packets that comprise the image.
-
- SEE ALSO
- display(1), animate(1), import(1), montage(1), mogrify(1),
- more(1), compress(1)
-
- COPYRIGHT
- Copyright 1992 E. I. du Pont de Nemours & Company
-
- Permission to use, copy, modify, distribute, and sell this
- software and its documentation for any purpose is hereby
- granted without fee, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of E. I. du Pont de Nemours
- & Company not be used in advertising or publicity pertaining
- to distribution of the software without specific, written
- prior permission. E. I. du Pont de Nemours & Company makes
- no representations about the suitability of this software
- for any purpose. It is provided "as is" without express or
- implied warranty.
-
- E. I. du Pont de Nemours & Company disclaims all warranties
- with regard to this software, including all implied
- warranties of merchantability and fitness, in no event shall
- E. I. du Pont de Nemours & Company be liable for any
- special, indirect or consequential damages or any damages
- whatsoever resulting from loss of use, data or profits,
- whether in an action of contract, negligence or other
- tortious action, arising out of or in connection with the
- use or performance of this software.
-
- AUTHORS
- John Cristy, E.I. du Pont de Nemours & Company Incorporated
-
-
-
-
-
- ImageMagick Last change: 1 July 1991 4
-
-