Auxiliary code for ../createimg


