Converting between these two formats isn't always straightforward because it depends on how they were created and what they contain. However, here are some general steps you might take:
I tested with a few common tools:
She remote-viewed his folder over a quick SSH tunnel. The file was 64 MB exactly. Good. That meant no header trash from a full partition backup. She opened a terminal and began muttering the steps like a litany. boot.emmc.win to boot.img
: This is the easiest method, but not all TWRP builds include this toggle. boot.emmc.win to boot.img