Added method to generate test images.