How do I convert .dmg to .img?

How do I convert DMG files to IMG files? I am trying to use 'Q emulator' to run XPpro and it requires an IMG file of the XP disc.(legal copy) I'm using a late model G5 PPC with Leopard 10.5.8


Solution 1:

According to a very old source [circa 2006]

In Terminal,

hdiutil convert disk.dmg -format RdWr -o disk.img

where disk.dmg is the path to your image (input) and disk.img the output image