Bug 939962: attempt to reduce memory requirements for saving an edited i...

...mage