This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "IMG" file format – news ·newspapers ·books ·scholar ·JSTOR(February 2019) (Learn how and when to remove this message) |
| IMG (file format) | |
|---|---|
| Filename extensions | .img, .ima |
| Internet media type | application/x-ima[1] |
AnIMGfile, a.k.a.raw image, contains a complete and uncompressedimage of astorage device's data content. The image includes the value of each memory location of the storage device, ordered sequentially such that the data can be written to a similar device to completely overwrite its content.
The layout of data in a raw image depends on thefile system of the target storage device (for exampleFAT). For example, anoptical disc (i.e.CD orDVD) raw image contains thetracks of audio or video. In the case of aCD-ROM or DVD, an image usually includes not only the data of each sector, but thecontrol headers and error correction fields for each sector as well.
Since raw image files hold no additional data,metadata, beyond the storage content, determining the structure of an existing image can be difficult. Either a user remembers what a file contains via their memory or records metadata in the file name or via some other mechanism. In some cases, a tool can detect aspects of an image file's content. For example, a typical floppy disk raw image begins with aFAT boot sector, which can be used to identify the file system. A raw optical disc image is usually accompanied by a separate file which describes the layout of the image data, including information such as track limits which are not in the raw image.
Raw disk image files sometimes have thefilename extension.img, but the extension is used for other file formats and often other extensions are used for a raw disk image file.
The.img file extension was originally used forfloppy disk raw disk images only. A similar file extension,.ima, is also used to refer to floppy disk image files by some programs. A variant of raw image, called IMZ, consists of agzipped 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.
QEMU uses the.img file extension for a raw image of ahard disk drive and calls the format "raw".
CloneCD stores optical disc images in.img files and generates additionalCloneCD Control Files (with.ccd extension) for each image to hold the necessarymetadata. TheCUE/BIN format stores disc images in.bin files, which are functionally equivalent to.img image files, and uses.cue files as descriptor files.
The extension.img is also used for (unrelated)planar graphics files, originating withDigital Research'sGEM. It was commonly used on theAtari ST line of home computers, but also with some GEM-based PC software such asCorel Ventura orTimeworks Publisher.
AnApple Disk Image file name may include the.img extension.
Garmin .img is a hard-disk image file format which contains a header and many subfiles and used to store the maps for itsGPS units.
For devices with sectors, the size of a raw disk image is 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:
E.g. for 80 cylinders (tracks) and 2 heads (sides) with 18 sectors per track:
For an optical disc such as a CD or DVD, the raw sector size is usually 2,352, making the size of a raw disc image a multiple of this value.
ISO images are another type of optical disc image files, which 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. They cannot contain multiple tracks, nor audio or video tracks. They also do not contain the control headers and error correction fields ofCD-ROM orDVD sectors that raw disc images usually store. Their internal format follows the structure of anoptical disc file system, commonlyISO 9660 (for CDs) orUDF (for DVDs). TheCUE/BIN andCCD/IMG formats, which usually contain raw disc images, can also store ISO images instead.
The raw image file format is used by several tools:
.img format