ILBM

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Resources)
(Software)
(42 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
|formattype=electronic
 
|formattype=electronic
 
|subcat=Graphics
 
|subcat=Graphics
|extensions={{ext|iff}}, {{ext|lbm}},<br> {{ext|ilbm}}, others
+
|extensions={{ext|iff}}, {{ext|lbm}}, {{ext|bbm}}, {{ext|ilbm}}, {{ext|pic}}, others
|pronom={{PRONOM|fmt/338}}, {{PRONOM|x-fmt/424}}
+
|pronom={{PRONOM|fmt/338}}, {{PRONOM|x-fmt/424}}, {{PRONOM|x-fmt/301}}
 +
|wikidata={{wikidata|Q2389386}}
 +
|released=1985
 
}}
 
}}
 
'''ILBM''' (or '''IFF-ILBM''', or '''LBM''') is a loosely-defined family of raster image file formats that use the [[IFF]] container format. ILBM stands for '''InterLeaved BitMap'''.
 
'''ILBM''' (or '''IFF-ILBM''', or '''LBM''') is a loosely-defined family of raster image file formats that use the [[IFF]] container format. ILBM stands for '''InterLeaved BitMap'''.
  
We define ILBM to include some formats that are not actually interleaved. We exclude image formats that use incompatible variants of IFF.
+
It is also sometimes called '''IFF''' or '''Amiga IFF''', though IFF more properly refers to the generic [[IFF]] format on which ILBM is based.
 +
 
 +
As seems to be common practice, we consider ILBM to include some similar formats whose type identifier is not "ILBM", and which are not necessarily interleaved. We exclude formats that use incompatible variants of IFF.
  
 
ILBM files were widely used on Amiga computers, but are not limited to that platform. The format originated with the ''Deluxe Paint'' program from Electronic Arts.
 
ILBM files were widely used on Amiga computers, but are not limited to that platform. The format originated with the ''Deluxe Paint'' program from Electronic Arts.
 +
 +
See also [[ANIM]].
 +
 +
== Terminology ==
 +
Be aware that terms such as ''interleaved'', ''planar'', and ''contiguous'' are ambiguous. In ILBM jargon, they tend to mean the exact opposite of what they mean with respect to most other image formats. By most definitions of the terms, ILBM would ironically be considered to be ''planar'', ACBM to be even more planar, and PBM to be ''contiguous''.
 +
 +
== Notes ==
 +
When "lost" computer graphics created by Andy Warhol on an Amiga computer were discovered and converted by retrocomputing buffs at the Carnegie Mellon University Computer Club in 2013, some of them were found to be in a slight variant of the ILBM format, with a .pic extension.
  
 
== Identification ==
 
== Identification ==
The IFF chunk identifiers (ASCII strings) <code>FORM</code> and (usually) <code>ILBM</code> appear near the beginning of the file. <code>BMHD</code> appears later in the file, usually immediately after <code>ILBM</code>.
+
The file begins with the ASCII string <code>FORM</code>, and has a type identifier at offset 8 that is usually <code>ILBM</code>. A <code>BMHD</code> chunk appears somewhere in the file, usually immediately after <code>ILBM</code>.
  
Some files do not contain an <code>ILBM</code> chunk, but instead contain a different chunk such as "<code>PBM&nbsp;</code>", <code>RGBN</code>, or <code>RGB8</code>.
+
Some variants formats have a "FORM type" that is something other than <code>ILBM</code>, such as <code>PBM</code>, <code>ACBM</code>, <code>RGBN</code>, or <code>RGB8</code>.
 +
 
 +
== Format details ==
 +
 
 +
=== Compression ===
 +
The image compression algorithm is indicated by a coded integer. The known compression types are 0 for no compression, 1 for [[PackBits]], and 2 for a special "vertical" RLE format (see VDAT, below).
 +
 
 +
=== Color cycling ===
 +
Some ILBM images are designed to be animated using palette color cycling, as indicated by <code>CRNG</code> chunks or other mechanisms. Many image viewers and converters don't support this feature.
 +
 
 +
=== Aspect ratio ===
 +
Many ILBM images were designed for graphics modes having non-square pixels, so they will look squished if displayed directly on a modern computer. Fortunately, there is an "aspect ratio" field (and sometimes other fields, such as a <code>DPI</code> chunk), which can supply the information needed to unsquish them. Unfortunately, though this field is usually correct, it is incorrect in a significant minority of files. For example, it may contain the reciprocal of the correct value, or it may be based on the shape of the image as a whole, instead of the shape of a pixel. There is probably no perfect solution to this problem.
 +
 
 +
=== Palette precision ===
 +
Some viewers appear to display some ILBM images slightly too dark. For example, the whitest white may be (240,240,240) instead of (255,255,255). This happens because, though the palette in an ILBM file always has 8 bits of precision per sample, some graphics modes did not use all 8. Encoders targeting such modes would sometimes carelessly set the low (usually 4) bits to zero. Some ILBM viewers try to detect this situation, and correct for it.
  
 
== Special types of ILBM ==
 
== Special types of ILBM ==
 
The plain ILBM format is reasonably well standardized. This section describes some of the ''other'' ILBM formats.
 
The plain ILBM format is reasonably well standardized. This section describes some of the ''other'' ILBM formats.
 +
 +
=== Hold-and-Modify ===
 +
Hold-and-Modify ('''HAM''') images are designed to work with the Amiga's oddball ''Hold-and-Modify'' graphics modes. There are two main kinds of HAM images: HAM6 (6 bits per pixel) and HAM8 (8 bits per pixel). The term ''HAM'' sometimes refers just to HAM6.
 +
 +
It is usually said that HAM6 supports up to 4096 different colors in an image, and HAM8 supports 262,144. This is probably true with regard to the actual Amiga graphics modes, but some not-so-carefully-written ILBM specifications imply that more colors are possible. Not that it matters much, because the real limitation is that, for each pixel, there are at most 64 or 256 available colors.
 +
 +
==== HAM6 ====
 +
HAM6 files have bit 11 of the <code>CAMG</code> chunk set, 6 planes (rarely 5), and 16 palette colors.
 +
 +
Reportedly, some HAM6 files are missing the <code>CAMG</code> chunk. A file with no <code>CAMG</code> chunk, 6 bit planes, and 16 palette colors is probably HAM6.
 +
 +
==== HAM8 ====
 +
HAM8 files have bit 11 of the <code>CAMG</code> chunk set, 8 planes (rarely 7), and 64 palette colors.
 +
 +
==== Multi-palette HAM ====
 +
There are at least three extended HAM formats designed to take advantage of the Amiga's ability to make changes to the palette in the middle of an image:
 +
* '''SHAM''' (Sliced HAM) - Uses a <code>SHAM</code> chunk.
 +
* '''CTBL''' (Newtek Dynamic Ham) - Uses <code>CTBL</code> and <code>DYCP</code> chunks.
 +
* '''PCHG''' - Uses a <code>PCHG</code> (Palette Changes) chunk.
 +
 +
==== HAM-E ====
 +
HAM-E (or HAME) is a format designed to work with particular video hardware from Black Belt Systems. Identifying an ILBM file as HAM-E is difficult; it can apparently only be done by looking for a special signature near the beginning of the pixel data. HAM-E files are structurally valid ILBM files, but will be displayed as garbage by viewers that don't support HAM-E.
 +
 +
=== Extra-Halfbrite ===
 +
Extra-Halfbrite (EHB) images are designed to work with the Amiga's ''Halfbrite'' graphics mode. They have 6 planes, but only 32 colors in the palette. In effect, the palette should be assumed to have an additional 32 colors that are half as bright as the first 32.
 +
 +
Extra-Halfbrite files are identified by bit 7 of the <code>CAMG</code> chunk being set.
 +
 +
=== Deep images ===
 +
Non-paletted (for example, 24-bit RGB) ILBM images are sometimes called "deep images". This is not to be confused with [[IFF-DEEP]], a different format.
  
 
=== PBM ===
 
=== PBM ===
PBM ('''Planar BitMap''') files have a "<code>PBM&nbsp;</code>" chunk instead of an <code>ILBM</code> chunk, and the image data is organized differently.
+
PBM ('''Planar BitMap''') files have FORM type of <code>PBM</code> instead of <code>ILBM</code>. Each pixel is stored contiguously, and there is only a single plane. PBM was mainly used on the [[MS-DOS]] platform.
  
This is not to be confused with [[Netpbm formats|Netpbm-PBM]], a much more common format named PBM.
+
This is not to be confused with [[Netpbm formats|Netpbm's PBM format]].
  
=== HAM ===
+
=== ACBM ===
HAM images are designed to work with the Amiga's ''Hold-And-Modify'' display mode. HAM files should contain a <code>CAMG</code> chunk with a particular flag set. Images have a maximum of 4096 colors.
+
'''ACBM''' (Amiga Contiguous Bitmap) is a variant of ILBM designed to be used efficiently by AmigaBASIC. The image is separated into bit-planes and then rows, instead of rows and then bit-planes.
  
=== HAM8 ===
+
The "FORM type" is <code>ACBM</code> (instead of <code>ILBM</code>), and instead of a <code>BODY</code> chunk there is an <code>ABIT</code> chunk.
HAM8 is a variant of HAM, designed to work with a display mode available on some Amigas. Images have a maximum of 262,144 colors.
+
  
=== HALFBRITE ===
+
=== RGBN and RGB8 ===
HALFBRITE images are designed to work with the Amiga's ''Halfbrite'' display mode. HALFBRITE files should contain a <code>CAMG</code> chunk with a particular flag set. Images have a maximum of 64 colors.
+
RGBN (12-bit RGB) and RGB8 (24-bit RGB) were used by Impulse's ''Silver'' and ''Turbo Silver'' programs (see also [[TDDD]]).
  
== Software ==
+
=== VDAT ===
It is possible that there is ''no'' single application that does a good job of decoding the full range of ILBM formats. More research is needed here.
+
In the ILBM variant we're calling VDAT (reportedly used by "the ST version of DPAINT"), instead of raw image data, the <code>BODY</code> chunk contains a sequence of <code>VDAT</code> chunks. It uses compression type 2. The format is similar, but not identical, to that used in [[Tiny Stuff]] files.
  
* [http://netpbm.sourceforge.net/ Netpbm]
+
=== DCTV ===
* [http://www.xnview.com/ XnView]
+
DCTV is a format designed to work with particular video hardware from Digital Creations. Like HAM-E, identifying an ILBM file as DCTV is difficult; it can apparently only be done by looking for a special signature near the beginning of the pixel data. DCTV files are structurally valid ILBM files, but will be displayed as garbage by viewers that don't support DCTV.
* [http://fail.sourceforge.net/ FAIL]
+
 
 +
=== NEOchrome Master ===
 +
Uses a <code>RAST</code> chunk. Refer to [[NEOchrome Master]].
 +
 
 +
== Specifications ==
 +
* [https://1fish2.github.io/IFF/IFF%20docs%20with%20Commodore%20revisions/ILBM.pdf "ILBM" IFF Interleaved Bitmap] - January 17, 1986 (CRNG data updated Oct, 1988 by Jerry Morrison) (Appendix E added and CAMG data updated Oct, 1988 by Commodore-Amiga, Inc.)
 +
* [http://wiki.amigaos.net/wiki/ILBM_IFF_Interleaved_Bitmap "ILBM" IFF Interleaved Bitmap], from the AmigaOS Documentation Wiki
 +
* [http://www.textfiles.com/programming/FORMATS/ilbm "ILBM" IFF Interleaved Bitmap] - January 17, 1986
 +
* [http://www.shikadi.net/moddingwiki/LBM_Format ModdingWiki: LBM Format]
 +
* {{AtariForumWiki|ST_Picture_Formats|ST Picture Formats}}
 +
* [http://www.textfiles.com/programming/FORMATS/pix_fmt.txt Picture format docs (of a number of formats including DeluxePaint LBM/IFF)]
 +
* {{EGFF|iff|IFF File Format Summary}}, from the [[Encyclopedia of Graphics File Formats]]
 +
* [http://www.fileformat.info/format/tddd/spec/dcee369361fe4eea875223dd04ab339d/view.htm FORM RGBN and FORM RGB8]
 +
* [https://github.com/svanderburg/libilbm/tree/master/doc libilbm / doc]
 +
* [http://aminet.net/package/docs/misc/ILBM64 ILBM64] - An extension to support 16 bits/sample
 +
 
 +
== Software ==
 +
* [[RECOIL]]
 +
* [[Konvertor]]
 +
* [[Netpbm]]
 +
* [[XnView]]
 +
* [https://www.irfanview.com/ Irfanview] with ''FORMATS'' [https://www.irfanview.com/plugins.htm plugin] 4.36 or more recent
 +
* [https://github.com/svanderburg/libilbm libilbm]
 +
* [[FFmpeg]]
 +
* [[ImageMagick]]
 +
* [http://snisurset.net/code/abydos/ abydos]
 +
* [http://www.boomerangsworld.de/cms/tools/iff-convert.html iff-convert]
  
 
== Sample files ==
 
== Sample files ==
 
* ftp://ftp.back2roots.org/pub/amigascne/Gfx/pics/
 
* ftp://ftp.back2roots.org/pub/amigascne/Gfx/pics/
* http://cd.textfiles.com/megamedia2/IMAGES/CARS/IFF24/
+
* {{CdTextfilesURL|zoom2/graphics/clipart/}} ...
* http://samples.libav.org/image-samples/ASH.LBM - a PBM file
+
* {{CdTextfilesURL|megamedia1/}} .../*.IFF
 +
* {{CdTextfilesURL|megamedia2/IMAGES/CARS/IFF24/}}
 +
* https://samples.libav.org/image-samples/ASH.LBM - a PBM file
 +
* https://github.com/mtuomi/SecondReality .../*.LBM - PBM files
 +
* http://www.fileformat.info/format/iff/sample/index.htm
 +
* [http://aminet.net/misc/sci/pl_pix.lha pl_pix.lha] → Plan_pix.lha → *.pic (ACBM)
 +
* [ftp://ftp.cs.tu-berlin.de/pub/aminet/pix/art/Hardwired1a.lha Hardwired1a.lha] (Extra-Halfbrite)
 +
* {{CdTextfiles|crawlycrypt1/tt/iffloadr/neworld.iff|neworld.iff}} (VDAT)
 +
* {{CdTextfilesURL|fishandmore/More/Graphics/Pictures/Sham/}} (SHAM)
 +
* https://telparia.com/fileFormatSamples/image/iffILBM/
 +
* https://telparia.com/fileFormatSamples/image/iffRGBN/
  
== Resources ==
+
== Links ==
 
* [[Wikipedia:ILBM|Wikipedia: ILBM]]
 
* [[Wikipedia:ILBM|Wikipedia: ILBM]]
* [http://www.textfiles.com/programming/FORMATS/ilbm ILBM spec]
 
* [http://www.shikadi.net/moddingwiki/LBM_Format ModdingWiki article]
 
 
* [http://www.textfiles.com/programming/AMIGA/iff.txt Intro to Amiga IFF ILBM Files and Amiga Viewmodes]
 
* [http://www.textfiles.com/programming/AMIGA/iff.txt Intro to Amiga IFF ILBM Files and Amiga Viewmodes]
* [http://www.fileformat.info/format/iff/egff.htm IFF File Format Summary]
 
 
* [[Wikipedia:Hold-And-Modify|Wikipedia: Hold-And-Modify]]
 
* [[Wikipedia:Hold-And-Modify|Wikipedia: Hold-And-Modify]]
 
* [[Wikipedia:Amiga Halfbrite mode|Wikipedia: Amiga Halfbrite mode]]
 
* [[Wikipedia:Amiga Halfbrite mode|Wikipedia: Amiga Halfbrite mode]]
* [http://hippie2000.back2roots.org/#ilbmtoppm Ralf Steines' (unreleased?) ilbmtoppm] - manpage has useful information
+
* [http://studioforcreativeinquiry.org/events/warhol-discovery Previously Unknown Warhol Works Discovered on Floppy Disks from 1985]
 +
* [http://studioforcreativeinquiry.org/public/warhol_amiga_report_v10.pdf Detailed report on the Warhol graphic recovery (PDF)]
  
 
[[Category:IFF based file formats]]
 
[[Category:IFF based file formats]]
 
[[Category:Amiga]]
 
[[Category:Amiga]]
 +
[[Category:Atari graphics formats]]
 +
[[Category:Electronic Arts]]

Revision as of 03:19, 9 February 2022

File Format
Name ILBM
Ontology
Extension(s) .iff, .lbm, .bbm, .ilbm, .pic, others
PRONOM fmt/338, x-fmt/424, x-fmt/301
Wikidata ID Q2389386
Released 1985

ILBM (or IFF-ILBM, or LBM) is a loosely-defined family of raster image file formats that use the IFF container format. ILBM stands for InterLeaved BitMap.

It is also sometimes called IFF or Amiga IFF, though IFF more properly refers to the generic IFF format on which ILBM is based.

As seems to be common practice, we consider ILBM to include some similar formats whose type identifier is not "ILBM", and which are not necessarily interleaved. We exclude formats that use incompatible variants of IFF.

ILBM files were widely used on Amiga computers, but are not limited to that platform. The format originated with the Deluxe Paint program from Electronic Arts.

See also ANIM.

Contents

Terminology

Be aware that terms such as interleaved, planar, and contiguous are ambiguous. In ILBM jargon, they tend to mean the exact opposite of what they mean with respect to most other image formats. By most definitions of the terms, ILBM would ironically be considered to be planar, ACBM to be even more planar, and PBM to be contiguous.

Notes

When "lost" computer graphics created by Andy Warhol on an Amiga computer were discovered and converted by retrocomputing buffs at the Carnegie Mellon University Computer Club in 2013, some of them were found to be in a slight variant of the ILBM format, with a .pic extension.

Identification

The file begins with the ASCII string FORM, and has a type identifier at offset 8 that is usually ILBM. A BMHD chunk appears somewhere in the file, usually immediately after ILBM.

Some variants formats have a "FORM type" that is something other than ILBM, such as PBM, ACBM, RGBN, or RGB8.

Format details

Compression

The image compression algorithm is indicated by a coded integer. The known compression types are 0 for no compression, 1 for PackBits, and 2 for a special "vertical" RLE format (see VDAT, below).

Color cycling

Some ILBM images are designed to be animated using palette color cycling, as indicated by CRNG chunks or other mechanisms. Many image viewers and converters don't support this feature.

Aspect ratio

Many ILBM images were designed for graphics modes having non-square pixels, so they will look squished if displayed directly on a modern computer. Fortunately, there is an "aspect ratio" field (and sometimes other fields, such as a DPI chunk), which can supply the information needed to unsquish them. Unfortunately, though this field is usually correct, it is incorrect in a significant minority of files. For example, it may contain the reciprocal of the correct value, or it may be based on the shape of the image as a whole, instead of the shape of a pixel. There is probably no perfect solution to this problem.

Palette precision

Some viewers appear to display some ILBM images slightly too dark. For example, the whitest white may be (240,240,240) instead of (255,255,255). This happens because, though the palette in an ILBM file always has 8 bits of precision per sample, some graphics modes did not use all 8. Encoders targeting such modes would sometimes carelessly set the low (usually 4) bits to zero. Some ILBM viewers try to detect this situation, and correct for it.

Special types of ILBM

The plain ILBM format is reasonably well standardized. This section describes some of the other ILBM formats.

Hold-and-Modify

Hold-and-Modify (HAM) images are designed to work with the Amiga's oddball Hold-and-Modify graphics modes. There are two main kinds of HAM images: HAM6 (6 bits per pixel) and HAM8 (8 bits per pixel). The term HAM sometimes refers just to HAM6.

It is usually said that HAM6 supports up to 4096 different colors in an image, and HAM8 supports 262,144. This is probably true with regard to the actual Amiga graphics modes, but some not-so-carefully-written ILBM specifications imply that more colors are possible. Not that it matters much, because the real limitation is that, for each pixel, there are at most 64 or 256 available colors.

HAM6

HAM6 files have bit 11 of the CAMG chunk set, 6 planes (rarely 5), and 16 palette colors.

Reportedly, some HAM6 files are missing the CAMG chunk. A file with no CAMG chunk, 6 bit planes, and 16 palette colors is probably HAM6.

HAM8

HAM8 files have bit 11 of the CAMG chunk set, 8 planes (rarely 7), and 64 palette colors.

Multi-palette HAM

There are at least three extended HAM formats designed to take advantage of the Amiga's ability to make changes to the palette in the middle of an image:

  • SHAM (Sliced HAM) - Uses a SHAM chunk.
  • CTBL (Newtek Dynamic Ham) - Uses CTBL and DYCP chunks.
  • PCHG - Uses a PCHG (Palette Changes) chunk.

HAM-E

HAM-E (or HAME) is a format designed to work with particular video hardware from Black Belt Systems. Identifying an ILBM file as HAM-E is difficult; it can apparently only be done by looking for a special signature near the beginning of the pixel data. HAM-E files are structurally valid ILBM files, but will be displayed as garbage by viewers that don't support HAM-E.

Extra-Halfbrite

Extra-Halfbrite (EHB) images are designed to work with the Amiga's Halfbrite graphics mode. They have 6 planes, but only 32 colors in the palette. In effect, the palette should be assumed to have an additional 32 colors that are half as bright as the first 32.

Extra-Halfbrite files are identified by bit 7 of the CAMG chunk being set.

Deep images

Non-paletted (for example, 24-bit RGB) ILBM images are sometimes called "deep images". This is not to be confused with IFF-DEEP, a different format.

PBM

PBM (Planar BitMap) files have FORM type of PBM instead of ILBM. Each pixel is stored contiguously, and there is only a single plane. PBM was mainly used on the MS-DOS platform.

This is not to be confused with Netpbm's PBM format.

ACBM

ACBM (Amiga Contiguous Bitmap) is a variant of ILBM designed to be used efficiently by AmigaBASIC. The image is separated into bit-planes and then rows, instead of rows and then bit-planes.

The "FORM type" is ACBM (instead of ILBM), and instead of a BODY chunk there is an ABIT chunk.

RGBN and RGB8

RGBN (12-bit RGB) and RGB8 (24-bit RGB) were used by Impulse's Silver and Turbo Silver programs (see also TDDD).

VDAT

In the ILBM variant we're calling VDAT (reportedly used by "the ST version of DPAINT"), instead of raw image data, the BODY chunk contains a sequence of VDAT chunks. It uses compression type 2. The format is similar, but not identical, to that used in Tiny Stuff files.

DCTV

DCTV is a format designed to work with particular video hardware from Digital Creations. Like HAM-E, identifying an ILBM file as DCTV is difficult; it can apparently only be done by looking for a special signature near the beginning of the pixel data. DCTV files are structurally valid ILBM files, but will be displayed as garbage by viewers that don't support DCTV.

NEOchrome Master

Uses a RAST chunk. Refer to NEOchrome Master.

Specifications

Software

Sample files

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox