One M9 flash system image
Usually large images are flashed in sparse (parts). To flash a full image that large, consider using the dd command in a shell to directly write the image to /system - that's the only approach I can think of that doesn't seem to have size issues.

[edit]:
dd worked (booted to twrp and opened adb shell):
dd if=/external_sd/system.img of=/dev/block/mmcblk0p66
where mmcblk0p66 is the system partition (in /dev/block/platform/&lt;something&gt;.sdhci/by-name you can find a list of all partitions)