Apple Icon Image
Encyclopedia
The Apple Icon Image format is the icon
Icon (computing)
A computer icon is a pictogram displayed on a computer screen and used to navigate a computer system or mobile device. The icon itself is a small picture or symbol serving as a quick, intuitive representation of a software tool, function or a data file accessible on the system. It functions as an...

 format used in Apple Inc.'s Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

. It supports icons of 16×16, 32×32, 48×48, 128×128, 256×256 and 512×512 pixels, with both 1-
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

 and 8-bit
8-bit
The first widely adopted 8-bit microprocessor was the Intel 8080, being used in many hobbyist computers of the late 1970s and early 1980s, often running the CP/M operating system. The Zilog Z80 and the Motorola 6800 were also used in similar computers...

 alpha channel
Alpha compositing
In computer graphics, alpha compositing is the process of combining an image with a background to create the appearance of partial or full transparency. It is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a...

s and multiple image states (example: open and closed folders). The fixed-size icons can be scaled by the operating system and displayed at any intermediate size.

Header

Offset Size Purpose
0 4 Magic literal, must be "icns" (0x69, 0x63, 0x6e, 0x73)
4 4 Length of file, in bytes

Icon data

Offset Size Purpose
0 4 Icon type, see OSType below.
4 4 Length of data, in bytes (including type and length)
8 Variable Icon data

Compression

Over the time the format have been improved and there is support for compression of some parts of the pixel data. The 32-bit ("is32", "il32", "ih32","it32") pixel data is often compressed (per channel) with the PackBits
PackBits
PackBits is a fast, simple lossless compression scheme for run-length encoding of data.Apple introduced the PackBits format with the release of MacPaint on the Macintosh computer. This compression scheme is one of the types of compression that can be used in TIFF-files...

 algorithm.

Some sources mentioned that the OS supports both compressed or uncompressed data chunks.

Icon types

OSType
OSType
OSType is the name of a four-byte sequence commonly used as an identifier in Mac OS. While the bytes can have any value, they usually display figures characterized in software programs such as those utilized in ASCII or Mac OS Roman character sets.OSType values are used to identify file data...

Length (bytes) Size (pixels) Description
ICON 128 32 32×32 1-bit mono icon
ICN# 256 32 32×32 1-bit mono icon with 1-bit mask
icm# 24 16 16×12 1 bit mask
icm4 96 16 16×12 4 bit icon
icm8 192 16 16×12 8 bit icon
ics# 32 16 16×16 1-bit mask
ics4 128 16 16×16 4-bit icon
ics8 256 16 16x16 8 bit icon
is32 varies (768) 16 16×16 24-bit icon
s8mk 256 16 16x16 8-bit mask
icl4 512 32 32×32 4-bit icon
icl8 1,024 32 32×32 8-bit icon
il32 varies (3,072) 32 32x32 24-bit icon
l8mk 1,024 32 32×32 8-bit mask
ich# 288 48 48×48 1-bit mask
ich4 1,152 48 48×48 4-bit icon
ich8 2,304 48 48×48 8-bit icon
ih32 varies (6,912) 48 48×48 24-bit icon
h8mk 2,304 48 48×48 8-bit mask
it32 varies (49,152) 128 128×128 24-bit icon
t8mk 16,384 128 128×128 8-bit mask
ic08 varies 256 256×256 icon in JPEG 2000
JPEG 2000
JPEG 2000 is an image compression standard and coding system. It was created by the Joint Photographic Experts Group committee in 2000 with the intention of superseding their original discrete cosine transform-based JPEG standard with a newly designed, wavelet-based method...

 or PNG format
ic09 varies 512 512×512 icon in JPEG 2000
JPEG 2000
JPEG 2000 is an image compression standard and coding system. It was created by the Joint Photographic Experts Group committee in 2000 with the intention of superseding their original discrete cosine transform-based JPEG standard with a newly designed, wavelet-based method...

 or PNG format
ic10 varies 1024 1024×1024 icon in PNG format (added in Mac OS X 10.7
Mac OS X Lion
Mac OS X Lion is the eighth and current major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers....

)
  • the values inside the brackets in the length column is the uncompressed length.


Icons created with 10.7's Icon Composer contain a 'TOC ' entry at the beginning that lists all of the image types contained within the icon and their size.

Some newer icons contain a 'icnV' entry at the end that is 12 bytes long (4 bytes data length). The last 2 bytes appear to always be 0, however the meaning of the other two bytes is unknown.

See also

  • Icon Composer
  • icns Browser
  • Computer icon
    Computer icon
    A computer icon is a pictogram displayed on a computer screen and used to navigate a computer system or mobile device. The icon itself is a small picture or symbol serving as a quick, intuitive representation of a software tool, function or a data file accessible on the system. It functions as an...

  • The Iconfactory
    The Iconfactory
    The Iconfactory is a small software and graphic design company that specializes in creating icons and software for creating and using icons. The company was founded in April 1996 by Corey Marion, Talos Tsui, and Gedeon Maheux. Lead Engineer Craig Hockenberry joined the company in 1997 and Artist...

  • IconBuilder
    IconBuilder
    IconBuilder is a popular plugin for Adobe Photoshop, Adobe Photoshop Elements and Macromedia Fireworks for the editing and creation of computer icons created and used by The Iconfactory. It supports all icon sizes for both Mac OS X and Microsoft Windows...

  • Wikipedia:Icons
  • PackBits
    PackBits
    PackBits is a fast, simple lossless compression scheme for run-length encoding of data.Apple introduced the PackBits format with the release of MacPaint on the Macintosh computer. This compression scheme is one of the types of compression that can be used in TIFF-files...

  • compare: ICO (icon image file format)
    ICO (icon image file format)
    The ICO file format is an image file format for computer icons in Microsoft Windows. ICO files contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK