Hi nrpeacock,
I did this a few days ago. Lets say you downloaded the Ubuntu ISO file into your Downloads directory and you renamed it to "ubuntu.iso". And lets say you want to generate the IMG file in your Desktop. You would use:
hdiutil convert -format UDRW -o ~/Desktop/ubuntu.img...