How to use *.img file instead of *.gz (or *.pit) file with Heimdall? I have downloaded .img file for TWRP recovery. How I should use it with Heimdall? It seems that Heimdall accepts .gz files (or .pit files in older versions), not .img!

I've tried opening an .img file and Heimdall complained


  Tar header contained an invalid file size


Opening a .tar file led to


  firmware.xml is missing from the package
Newer versions of Heimdall will accept a .img file for the --RECOVERY parameter and automatically download a PIT from the device to add the img contents to.

$ heimdall flash --RECOVERY recovery.img 
Heimdall v1.4.1

[trimmed some output here]

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading RECOVERY
100%
RECOVERY upload successful

Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...