Improvements to renderimage