Misplaced Pages

IMG (file format)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

This is an old revision of this page, as edited by Sega381 (talk | contribs) at 15:49, 19 July 2013 (minor rewordings, some clarifications. Still needs some corrections.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 15:49, 19 July 2013 by Sega381 (talk | contribs) (minor rewordings, some clarifications. Still needs some corrections.)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff) This article is about a raw disk image file format with .img filename extension. For Apple Inc.'s disk images using the .img filename extension, see Apple Disk Image. For disk images based on the ISO 9660 file system, see ISO image. For the GPS device map format, see Garmin .img.

IMG, in computing, refers to binary files with .img filename extension that store raw disk images of floppy disks, hard drives, or optical discs.

Overview

The .img filename extension is used by disk image files, which contain raw dumps of a magnetic disk or of an optical disc. Since a raw image consists of a sector-by-sector binary copy of the source medium, the actual format of the file contents will depend on the file system of the disk from which the image was created (such as a version of FAT). Since IMG files hold no additional data beyond the disk contents, these files can only be handled by programs that can detect their file systems. For instance, a typical raw disk image of a floppy disk begins with a FAT boot sector. Raw disk images of optical media (such as CDs and DVDs) contain a raw image of all the tracks in a disc (which can include audio, data and video tracks).

Filename extensions

The .img file extension was originally used for floppy disk raw disk images, though it is currently used to refer to hard drive disk images as well. A similar file extension, .ima, is also used to refer to floppy disk image files by some programs. CloneCD stores optical disc images in .img files but also generate additional CloneCD Control Files (with .ccd extension) for each image to hold necessary metadata.

A variant of IMG is the CUE/BIN format which store disk images in .bin files. These images usually include not only the data from each sector in an optical disc, but the control headers and error correction fields for each sector as well. The exact contents of the image files are described in the accompanying .ccd or .cue descriptor files.

Another variant of IMG, called IMZ, consists of a gzipped version of a raw floppy disk image. These files use the .imz file extension, and are commonly found in compressed images of floppy disks created by WinImage.

Size

The file size of a raw disk image is always a multiple of the sector size. For floppy disks and hard drives this size is typically 512 bytes (but other sizes such as 128 and 1024 exist). More precisely, the file size of a raw disk image of a magnetic disk corresponds to:

Cylinders × Heads × (Sectors per track) × (Sector size)

e.g. for 80 cylinders (tracks) and 2 heads (sides) with 18 sectors per track:

80 × 2 × 18 × 512 = 1,474,560 bytes or 1440 kB

Comparison of ISO images

ISO images commonly use the .iso file extension, but sometimes use the .img file extension as well. They are similar to the raw optical disc images, but contain only one track with computer data obtained from an optical disc (not multiple tracks, nor audio or video tracks). They also do not contain the control headers and error correction fields that raw disc images usually store. Their internal format follows the structure of an optical disc file system such as ISO 9660 (for CDs) or UDF (for DVDs). The CUE/BIN and CCD/IMG formats support using ISO images instead of raw disc images as well, though this is not their default structure.

Tools

The raw IMG file format is used by several tools:

References

  1. LibDsk suite of tools for accessing discs and disc image files
Disk image file formats
Comparison of disc image software
Optical discs
Hard disks
Floppy disks
CDDADisc Description Protocol
Convention: Any item in this table that has the form of "A+B" or "A+B+C" indicates a disk format that spans multiple files, where A contains the bulk of the data, and B and C are sidecar files.
Categories: