Revert "Clean up image writer patching."
Revert "Clean up image writer patching."

This reverts commit fc3b871ca37593561e3b67006771710bf4d174ea.

Change-Id: I4d1250f3adcd17fcd1b63496816e098db4d5be3c

treadstoneproject/artinst,treadstoneproject/artinst,treadstoneproject/artinst,treadstoneproject/artinst,treadstoneproject/artinst