Question
The purpose of this assignment is to use Python to merge several photographic elements into a single photo. Basically I'm trying to cut two images
The purpose of this assignment is to use Python to merge several photographic elements into a single photo. Basically I'm trying to cut two images in half and then put the halves together to make one image. Below is my code I've used so far to attempt this. I keep getting stuck on the setColor function. Please help.
def Collage():#defines the program being written file=pickAFile()#prompts the user to choose a file from a specified drive Antelopepicture = makePicture(file) Antelopepixels = getPixels(Antelopepicture)#retrieves the pixels from a given file file=pickAFile()#promts the user to choose a file from a specified drive Jackrabbitpicture = makePicture(file) Jackrabbitpixels = getPixels(Jackrabbitpicture) newPicture = makeEmptyPicture (1024, 683)#retrieves the pixels from a given file for position in range(len(Antelopepixels)/2, len(Antelopepixels)):#tells the program where to start the dividing line between pictures currentPixell=Antelopepixels[512]#tells the program where to stop and start when putting the two pictures together currentPixell=Jackrabbitpixels[513]#tells the program where to stop and start when putting the two pictures together currentPixelColor=getColor setColor(512, currentPixelColor)#defines a color for the new picture explore(newPicture) writePictureTo(Jackalope,"C:\Desktop\Cyber Security Stuff\Jackalope.jpg")
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started