An IMG
file, a.k.a. raw image, contains a complete and uncompressed
image
An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
of a
storage 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 the
file system of the target storage device (for example
FAT
In nutrition science, nutrition, biology, and chemistry, fat usually means any ester of fatty acids, or a mixture of such chemical compound, compounds, most commonly those that occur in living beings or in food.
The term often refers specif ...
). For example, an
optical disc
An optical disc is a flat, usuallyNon-circular optical discs exist for fashion purposes; see shaped compact disc. disc-shaped object that stores information in the form of physical variations on its surface that can be read with the aid o ...
(i.e.
CD or
DVD) raw image contains the
tracks of audio or video. In the case of a
CD-ROM
A CD-ROM (, compact disc read-only memory) is a type of read-only memory consisting of a pre-pressed optical compact disc that contains computer data storage, data computers can read, but not write or erase. Some CDs, called enhanced CDs, hold b ...
or DVD, an image usually includes not only the data of each sector, but the
control headers and error correction fields for each sector as well.
Since raw image files hold no additional data,
metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
, 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 a
FAT 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.
Filename extension
Raw disk image files sometimes have the
filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
, 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 for
floppy disk
A floppy disk or floppy diskette (casually referred to as a floppy, a diskette, or a disk) is a type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined with a ...
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 a
gzip
gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
ped 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
The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
uses the
.img
file extension for a raw image of a
hard disk drive
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
and calls the format "raw".
CloneCD stores optical disc images in
.img
files and generates additional
CloneCD Control Files (with
.ccd
extension) for each image to hold the necessary
metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
. The
CUE/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 with
Digital Research
Digital Research, Inc. (DR or DRI) was a privately held American software company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser ...
's
GEM. It was commonly used on the
Atari ST
Atari ST is a line of personal computers from Atari Corporation and the successor to the company's Atari 8-bit computers, 8-bit computers. The initial model, the Atari 520ST, had limited release in April–June 1985, and was widely available i ...
line of home computers, but also with some GEM-based PC software such as
Corel Ventura or
Timeworks Publisher.
An
Apple Disk Image
Apple Disk Image is a disk image format commonly used by the macOS operating system. When opened, an Apple Disk Image is mounted as a volume within the Finder.
An Apple Disk Image can be structured according to one of several proprietary disk ...
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 its
GPS units.
Size
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:
:
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
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.
Comparison to ISO images
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 of
CD-ROM
A CD-ROM (, compact disc read-only memory) is a type of read-only memory consisting of a pre-pressed optical compact disc that contains computer data storage, data computers can read, but not write or erase. Some CDs, called enhanced CDs, hold b ...
or
DVD sectors that raw disc images usually store. Their internal format follows the structure of an
optical disc
An optical disc is a flat, usuallyNon-circular optical discs exist for fashion purposes; see shaped compact disc. disc-shaped object that stores information in the form of physical variations on its surface that can be read with the aid o ...
file system, commonly
ISO 9660 (for CDs) or
UDF (for DVDs). The
CUE/BIN and
CCD/IMG formats, which usually contain raw disc images, can also store ISO images instead.
Tools
The raw image file format is used by several tools:
* RaWrite and WinImage use the raw image format to read and write floppy disk images
*
ImDisk an
Virtual Floppy Drivecan mount a raw image of a floppy disk to emulate a floppy drive under
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
*
Nero Burning ROM
Nero Burning ROM, commonly called Nero, is an optical disc authoring program from Nero AG. The software is part of the Nero Multimedia Suite but is also available as a stand-alone product. It is used for burning and copying optical media such ...
supports reading raw image files for creating
bootable CDs
*
mtools allows manipulation of
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
floppy disk images in
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
systems
* Programs such as ''dsktrans'' from the ''LibDsk''
LibDsk suite of tools for accessing discs and disc image files
/ref> suite of command-line tools (available for Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
, and Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
) will convert between different raw disk image formats
* dd can read and write raw image files
* QEMU
The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
uses raw image files as its default format for hard disk drive
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
images
* IrfanView with the plugin "FORMATS" (''formats.dll'') supports viewing GEM-IMG vector graphics
* Garmin MapSource or GPSMapEdit can be used to read Garmin hard-disk image .img
format
References
{{DEFAULTSORT:Img (File Format)
Computer file formats
Archive formats