How to view .img files?
Asked Answered
I

12

23

I'm trying find software to view .img files. But its not expected. .img file its not all images, it contains some values too. So I would like to view the .img file. Please advise any software like that.

Ingroup answered 3/11, 2012 at 12:38 Comment(4)
Should be moved to softwarerecs.stackexchange.comHayfork
Yes .img files are disk images but a different format to .iso . I don't know how to open them.Tissue
Are these DICOM (medical) images, by any chance? Sometimes that extension is used for that realm. Use a hex viewer to look for the 4CC of ascii DICM at offset 128.Schematic
definitely not programming (belongs on superuser.com or something), definitely not related to processing images that are pictures (entirely wrong tags). this appears to be about disk/VM "images", which are containers for file systems. voting to close. why would anyone ever put a bounty on this?Fovea
I
29

If you want to open .img files, you can use 7-zip, which is freeware...

http://www.7-zip.org/

Once installed, right click on the relevant img file, hover over "7-zip", then click "Open Archive". Bear in mind, you need a seperate program, or Windows 7 to burn the image to disc!

Hope this helps!

Edit: Proof that it works (not my video, credit to howtodothe on YouTube).

Indoors answered 3/11, 2012 at 12:47 Comment(4)
7-zip does not support .img files.Sorrel
@Binyamin, added a proof video of an extract working on XP, viewing files should work too!Indoors
@matt-maclennan, I was checking Android ROM .img files. Still 7-zip is not compatible to open/extract them.Sorrel
Worked for me. Used 7zip to extract Win 3.11 .img files.Souterrain
P
14

.img is way too unspecific. This file extension is widely used for a variety of (raw) file formats. It is an abbreviation for “image” and that can be any image you can imagine—or cannot imagine at all, as you have never heard of it.

For example, .IMG used to be a GEM bitmap image file. Does anyone remember GEM at all? It was the Windows competitor from Digital Research. The Atari ST version was widely used, but there was also a DOS version of GEM. One of the stripped down versions (which was necessary to avoid copyright claims from Apple) was ViewMAX included in DR DOS 3.41, 5.0 and 6.0 as well as Novell DOS 7.0. It is now open source and can be downloaded freely as OpenGEM. Still requires DOS and is included in the FreeDOS distribution. For viewing GEM bitmap images, Windows programs of that time (around DOS-based Windows 3.0) such as Ventura Publisher could open and consequently convert such “GEM images” or “Atari ST images” into other, more widely used formats.

But I doubt that this kind of .img-file is what you meant. Still, you have to be more specific.

Most widely .img is used as a raw filesystem image of e.g. a floppy disk. As mentioned by others, such images can be opened by a number of programs. Or directly mounted under Unix-like systems like BSD and Linux. 7-Zip is also able to extract files from such images for supported filesystems, such as FAT. At least the command-line version. Just type 7z x image.img and it will extract the included files.

Note however that there are also other image formats out there, such as IBM's .dsk, sometimes using different file extensions. Such files can be raw floppy images, but they can also be in IBM's SAVEDSKF/LOADDSKF format. These files are basically raw files with stripped zeros at the end, but with a header at the beginning of the files. I doubt that 7-Zip can extract such images, even though it would only be necessary to find the appropriate offset. Anyhow, since the image past the header is basically raw and uncompressed, using dd you can extract the image and make it a raw .img floppy image. Suppose the header is hex:291 bytes long (which you will have to figure out by looking inside the file e.g. using a hex editor). This equals 657 bytes to skip, resulting in dd if=image.dsk of=rawimage.img bs=1 skip=657. The resulting rawimage.img would however be non-standard in size. This can be fixed, again, by using dd. dd if=/der/zero of=rawimage.img count=0 bs=1 seek=1474560 – this will make a sparse file out of it, resulting in the correct file size for a 1.44 MB floppy image and returning zeros at unused positions. Works with most programs under Linux.

But in general, .img can be any file that is classified as “an image”, thus any application can include a (proprietory) file with this extension. Such files can than only be used (opened) by said application.

Pondicherry answered 25/6, 2017 at 17:9 Comment(2)
There is a variaty of programs using the img file extension: the File Extension Seeker lists probably most of them.Pondicherry
If the file is an APFS disk image then 7z needs to be release 22.00 or later.Voigt
C
7

If you use Linux or WSL you can use the forensic application binwalk to extract .img files (which are usually disk images) like this:

  1. Use your distribution package manager or follow the manual instructions to install binwalk.

  2. Use the command binwalk -e FILENAME.img to extract recognized content into a automatically generated directory.

Condottiere answered 10/6, 2020 at 4:23 Comment(0)
T
5

you could use either PowerISO or WinRAR

Toolis answered 3/11, 2012 at 12:44 Comment(1)
The freeware file image utilities IsoBuster and CDmage can extract IMG files to hard driveToolis
T
4

As you did not mention which OS you are running, here a solution for linux: use losetup

losetup /dev/loop0 /path/to/your/file.img

Then you can mount it.

Termination answered 12/10, 2015 at 15:33 Comment(0)
H
4

At first you should use file to identify the image:

file foo.img

Hydroplane answered 16/1, 2019 at 13:16 Comment(0)
L
3

.IMG files are ususally filesystems, not pictures. The easiest way to access them is to install VMWare, install Windows in VMWare, and then add the .img file as some kind of disk device (floppy, cdrom, hard disk). If you guess the right kind, Windows might be able to open it.

Lowering answered 24/2, 2014 at 20:47 Comment(0)
A
3

The file extension .img does not say anything about its content.

Most commonly .img files are a floppy/CD/DVD/ISO image, a filesystem image, a disk image, or even just (custom) binary data.

In case it is an CD/DVD image or a specific filesystem image (like fat, ntfs, ...) you can open these files with 7-Zip.

On *nix based systems also the file tool or (libmagic) could help you find out what it is.

Adai answered 10/10, 2015 at 16:6 Comment(0)
D
1

With *nix, usually, you don't need a software to view an .img file. You can use the loop device to mount it and then every file manager to navigate it. Here you can find how. Sometime you need to install some package to manage strange filesystem like squashfs.

Discrepancy answered 12/10, 2015 at 15:46 Comment(0)
S
1

OSFMount , MagicDisc , Gizmo Director/Gizmo Drive , The Takeaway .

All these work well on .img files

Sermonize answered 12/10, 2015 at 19:12 Comment(1)
Used OSFMount, it's very simple. It just loads the img-file as virtual hard drive or and ISO as CD-image.Highhat
G
1

Example of .img = .ico

It might be rare, but I found this "visual picture" .img file hiding in plain sight on the homepage of the Edge browser. Microsoft Edge had a shortcut to Amazon.ca on the New-tab page, along with Amazon's icon. When I downloaded the icon it had the .img file extension.

None of my photo software was able to give an auto-preview of this .img file, but I knew it was a visual picture image. The html web-page context of the image's source made me think of a favicon, so I tried renaming the .img with an .ico extension, and it worked!

Detailed Notes

"I downloaded the icon" from the F12 Console, see screenshot, since it wasn't available for download from the page itself. Even without downloading, the .img extension is seen in the html code and the image itself is visible when opening it in a new Edge tab. (see screenshot screen shot of html in Edge browser with .img picture file)

"able to give an auto-preview", meaning that I wanted to see the picture content in Windows 10 File Explorer as an icon of any size (View menu) and in the Preview pane. You still need some of the other Windows settings mentioned in above posts, such as:

  • File Explorer, View menu, Options, View tab
    • ⬜ must UNCHECK "Always show icons, never thumbnails"
    • ⬜ unnecessary to "Show preview handlers in preview pane"
  • search for "Performance", choose "Adjust the appearance and performance of Windows":
    • ☑ must CHECK "Show thumbnails instead of icons"

"None of my photo software was able to give an auto-preview", addresses that if the .img file type was associated with a particular app, would it auto-preview? Note that most apps WERe able to open the .img as a picture, but not give a preview. For example:

  • Free-ware, which could neither Preview nor Open the .img:

    • ❌ Paint.net
    • ❌ Inkscape
    • (there may exist some that can do it, let us know if you find one!)
  • Software built-in from Microsoft, which could NOT Preview, but could OPEN the .img:

    • ✔ Paint
    • ✔ Paint 3D
    • ✔ Photos
Glennglenna answered 13/5, 2021 at 21:55 Comment(0)
D
0

mkdir -p mnt && sudo mount $(sudo losetup --show -f /path/to/file.img) mnt

ls -l mnt

Makes a directory named 'mnt' in the current working directory

Binds a loop device to the image file so it can be used like a block device

mounts that block device to the mnt directory

Dewittdewlap answered 18/8, 2022 at 23:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.