Forms a target image by patching together images from a library