From Apple Support
Create a disk image from a disk or connected device
You can create a disk image that includes the data and free space on a physical disk or connected device, such as a USB device. For example, if a USB device or volume is 80 GB with 10 GB of data, the disk image will be 80 GB in size and include data and free space. You can then restore that disk image to another volume.
In Terminal, using the hdiutil
command, you can convert existing disk images into a number of compressed file formats. If you are just storing the compressed files for archival purposes, this may work for you.
convert image -format format -o outfile
This page replicates the info from man hdiutil
.