Both .ima and .img files are actually disk images (representations of physical discs), which means that for a successful ima to img conversion you will have to use one of the disk image management tools, for example ISObuster.
Unless you need the IMG format for specific purpose, it might be best to use ISO format instead.
Updated: October 25, 2023