Parallelize image generation. Fixes #9.