[WIP] Inline image resize-on-writer

This adds to  ResultingImageWriter the ability to resize images before writing. This is probably broken (I'm still working on the test server, so I've not tested it), and this implementation doesn't support more than one size, or handle stream names well.

Dont merge till it's done.

K