Adding spaces to image/* to avoid warning about /* inside comment block
[Issue #1483] Break out of loop if output stream does not have space to write bytes