Misplaced Pages

IMG (file format): Difference between revisions

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.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 07:53, 13 November 2011 editPol098 (talk | contribs)Extended confirmed users, Pending changes reviewers118,775 edits Support and development: accessing proprietary images on modern machines← Previous edit Latest revision as of 19:57, 27 November 2022 edit undoSWinxy (talk | contribs)Extended confirmed users, Template editors12,779 editsm top: MOS:ORDERTag: 2017 wikitext editor 
(86 intermediate revisions by 52 users not shown)
Line 1: Line 1:
{{Merge to|IMA (file format)|date=June 2011}} {{short description|Computer file format}}
{{About|a raw disk image file format with .img filename extension|Apple Inc.'s disk images using the .img filename extension|Apple Disk Image|disk images based on the ISO 9660 file system|ISO image|the GPS device map format|Garmin .img}}
{{Unreferenced|date=December 2009}}
{{ref improve|date=February 2019}}
The '''IMG file format''' is one of the following files:
{{Infobox file format
| mime = application/x-ima <ref>{{cite web |url=https://www.sitepoint.com/mime-types-complete-list/|title=MIME Types - the Complete List|date=15 August 2015 }}</ref>
| extensions = .img, .ima
}}


'''IMG''', in computing, refers to ]s with the <code>.img</code> ] that store raw ] of ]s, ]s, and ]s or a ] – <code>.img</code>.
# A CD or DVD image file, essentially equivalent to an ISO file. On such a file, simply changing the extension from IMG to ISO can make it usable as the latter by most programs.
# An ] used for creating a ] of floppy disks and HDDs. This allows for digital storage, transmission, and replication of floppy disks and HDDs. Files created using this format typically use the ".IMG" ]. There are different, incompatible image formats which use the .IMG extension.
# A file in the '']'' format used by ] (now ]) ] and ] for ] although they share the same file extension.
# The IMG file format, also known as ''GEM IMG'', is an image file format used to store bitmap digital images on ].
# A graphics image format used in various ways by many different graphics software packages.


==IMG formats== ==Overview==
The <code>.img</code> ] is used by ] files, which contain raw dumps of a ] or of an ]. Since a raw image consists of a ]-by-sector binary copy of the source medium, the actual format of the file contents will depend on the ] of the disk from which the image was created (such as a version of ]). Raw disk images of ] (such as ]s and ]s) contain a raw image of all the ] in a disc (which can include audio, data and video tracks). In the case of ]s and DVDs, these images usually include not only the data from each sector, but the ] and error correction fields for each sector as well.
The IMG file extension is used by files which are standardised raw dumps of a disk, and by files in various formats created by different imaging programs.


Since IMG files hold no additional data beyond the disk contents, these files can only be automatically handled by programs that can detect their ]s. For instance, a typical raw disk image of a floppy disk begins with a ], which can be used to identify its file system. Disc images of optical media are usually accompanied by a descriptor file which describes the layout of the disc, and includes information such as track limits which are not stored in the raw image file.
* A raw ] of the content of a disk is usually saved with the extension .IMG. This format is not compatible with the ] and ] format but is supported by multiple software vendors and conventions. It contains the same data as the ] file format. In this case the image typically begins with a ], where the first byte is normally hexadecimal EB (code for a 8bit short jump, offset in the 2nd byte) with third byte 90 (code for a NOP), or rarely EA (code for a 16bit jump, offset in 2nd and 3rd byte). The file size will always be a multiple of the sector size &mdash; generally 512 bytes, but other sizes such as 128 and 1024 existed. More precisely the file size corresponds to <tt><abbr title="CHS">Cylinders&times;Heads&times;(Sectors per track)</abbr></tt>, e.g., <tt>1440KB=80&times;2&times;18&times;512</tt> for 80 cylinders (tracks) and 2 heads (sides) with 18 sectors per track.


===Filename extensions and variants===
* Files with the .IMG extension files are created by MS-DOS tools such as ] which store the contents of a disk in a usually compressed form, different for different imaging programs: the .IMG extension is not standardised for other than raw images, and .IMG files created by different programs are not necessarily compatible. The first few bytes of the file may identify the imaging program that created it; as the file is compressed its size depends upon the contents of the image.
The <code>.img</code> file extension was originally used for ] raw disk images only. A similar file extension, <code>.ima</code>, is also used to refer to floppy disk image files by some programs. A variant of IMG, called IMZ, consists of a ]ped version of a raw floppy disk image. These files use the <code>.imz</code> file extension, and are commonly found in compressed images of floppy disks created by WinImage.


] uses the <code>.img</code> file extension for raw images of ] disks, calling the format simply "raw".
==Support and development==
The raw IMG file format is currently supported by ] ] & ], and ]. It is utilized by ], ] and ].


] stores optical disc images in <code>.img</code> files and generates additional ]s (with <code>.ccd</code> extension) for each image to hold the necessary ]. The ] format stores disc images in <code>.bin</code> files, which are functionally equivalent to <code>.img</code> image files, and uses <code>.cue</code> files as descriptor files.
] prior to 6.0 supported reading IMG file for creating ], but since then calls them ].


===Size===
Image files with the .IMG extension but not in raw image format are produced by several imaging programs, and are not necessarily compatible with each other, or with programs which handle raw images. There are programs which will convert between the image formats used by various programs, including raw format; one such is ''dsktrans'' from the the ''LibDsk''<ref></ref> suite of command-line tools for ], ], and ].
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:
:<abbr title="CHS">Cylinders × Heads × (Sectors per track) × (Sector size)</abbr>
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&nbsp;]


For optical discs such as CDs and DVDs, the raw sector size is usually 2,352, making the size of a raw disc image a multiple of this value.
Programs such as ] and can mount a raw image of a floppy disk to emulate a floppy drive under Windows.


==Comparison to ISO images==
Accessing old floppy images in proprietary non-raw format on modern hardware can be problematical. There are some programs such as ], a command-line program originally for Unix but ported to Microsoft Windows, which can convert images between many formats, although the syntax is rather complex. Alternatively the original program, if available, can be used either to create a physical floppy<ref></ref> which can be used directly or re-encoded in standard raw format. Or a ] can be used without the need for a physical floppy drive at all; ], for example, can mount a raw floppy image into a virtual drive A:, and the imaging program can "write" the image to the virtual floppy, thereby creating a raw image from the non-standard file. the virtual machine used must run an operating system that supports the imaging program, which may be an older Windows, Linux, MS-DOS, or any other operating system supported by the virtual hardware.<ref>The process of converting a non-standard floppy image to raw format is a logical consequence of a virtual machine with a virtual floppy which is a raw file; "writing" an image to the "floppy" must produce a raw image. This can be confirmed by construction, using free virtualisation software such as VMWare player, the imaging software, and a virtual machine running an operating system which supports it. Simply mount an existing raw floppy image (it need not be empty), and run the imaging program with output to the virtual floppy drive; the file used in the virtual floppy will become a raw image with the same content as the proprietary one</ref>
]s are another type of optical disc image files, which commonly use the <code>.iso</code> file extension, but sometimes use the <code>.img</code> 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 ] or ] sectors that raw disc images usually store. Their internal format follows the structure of an ] file system, commonly ] (for CDs) or ] (for DVDs). The ] and ] formats, which usually contain raw disc images, can also store ISO images instead.


==IMG as an image file format==
==Use==
<code>.img</code> is also a planar bitmap graphics file using simple run-length encoding, originating with ]'s ]. It was commonly used on the ] line of home computers, but also with some GEM-based PC software such as ] or ].
IMG files are used for:
* Digital storage, transmission, and replication of floppy disks.
* Mounting virtual floppy disk volumes.


==Other disk image files==
==See also==
{{main|Apple Disk Image}}
* ]
{{main|Garmin .img}}
In addition, <code>.img</code> is an ] used by the Mac OS X or ] operating system.

] is a hard-disk image file format which contains a header and many subfiles and used to store the maps for its ] units.

==Tools==
The raw IMG file format is used by several tools:
* RaWrite and WinImage use the IMG disk image format to read and write floppy disk images.
* ] and can mount a raw image of a floppy disk to emulate a floppy drive under ].
* ] supports reading IMG files for creating ]s.
* ] allows manipulation of ] floppy disk images in ] systems.
* Programs such as ''dsktrans'' from the ''LibDsk''<ref></ref> suite of command-line tools (available for ], ], and ]) will convert between different raw disk image formats.
* ] can be used in ] to create raw disk image files of disks.
* ] uses IMG files as its default format for ] disk images.
* ] 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 <code>.img</code> format.


==References== ==References==
{{reflist}} {{reflist}}

== External links ==
* Convert IMG disk image to ISO disk image


{{Disk images}} {{Disk images}}
Line 46: Line 62:
] ]
] ]


{{software-type-stub}}

]
]

Latest revision as of 19:57, 27 November 2022

Computer file format 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.
This article needs additional citations for verification. Please help improve this article by adding 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

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

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). 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). In the case of CD-ROMs and DVDs, these images usually include not only the data from each sector, but the control headers and error correction fields for each sector as well.

Since IMG files hold no additional data beyond the disk contents, these files can only be automatically 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, which can be used to identify its file system. Disc images of optical media are usually accompanied by a descriptor file which describes the layout of the disc, and includes information such as track limits which are not stored in the raw image file.

Filename extensions and variants

The .img file extension was originally used for floppy 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 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.

QEMU uses the .img file extension for raw images of hard drive disks, calling the format simply "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. 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.

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

For optical discs such as CDs and DVDs, 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 or DVD sectors that raw disc images usually store. Their internal format follows the structure of an optical disc 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.

IMG as an image file format

.img is also a planar bitmap graphics file using simple run-length encoding, originating with Digital Research's GEM. It was commonly used on the Atari ST line of home computers, but also with some GEM-based PC software such as Corel Ventura or Timeworks Publisher.

Other disk image files

Main article: Apple Disk Image Main article: Garmin .img

In addition, .img is an Apple Disk Image used by the Mac OS X or macOS operating system.

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.

Tools

The raw IMG file format is used by several tools:

  • RaWrite and WinImage use the IMG disk image format to read and write floppy disk images.
  • ImDisk and Virtual Floppy Drive can mount a raw image of a floppy disk to emulate a floppy drive under Microsoft Windows.
  • Nero Burning ROM supports reading IMG files for creating bootable CDs.
  • mtools allows manipulation of MS-DOS floppy disk images in Unix systems.
  • Programs such as dsktrans from the LibDsk suite of command-line tools (available for Linux, MS-DOS, and Microsoft Windows) will convert between different raw disk image formats.
  • dd can be used in Unix to create raw disk image files of disks.
  • QEMU uses IMG files as its default format for hard drive disk 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

  1. "MIME Types - the Complete List". 15 August 2015.
  2. 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: