Unify image generation code.
Pass tile parameters from command line.