What do the following mean?
Modify any of the methods from the last chapter to use a nested loop. Run it to make sure it still works.
Take a picture of a person and mirror just their top part to their bottom part (two heads, with one at either end).
Take a picture of a person and mirror it so that the person looks like conjoined twins.
Create a new method that will blend two pictures with 10% from just the first picture and a 80% overlap and then 10% from just the last picture. It helps if the two pictures are the same width and height.
Create a new method that will blend two pictures with 20% from just the first picture and a 60% overlap and then 20% from just the last picture. It helps if the two pictures are the same width and height.
Modify Program 5 (page 97) to take the amount to reduce red by as a parameter.
Modify Program 22 (page 139) to be more general by passing in the start and stop x and y and the mirror point in x.
Convert the method copyFlowerLarger() (Program 31 (page 162)) to a method that can scale any picture up to twice the original width and height. It should return a new picture object created using new Picture(this.getWidth() * 2,this.getHeight() * 2).
Write a method to flip a picture over so that things that were on the left are now on the right. You probably want to create a new picture and copy the pixels from a passed-in picture to the new picture. Return the new picture.
Modify Program 29 (page 158) in this chapter to take the source picture to rotate and to create a new picture of just the needed size. Return the new picture.
Write a method to mirror a picture around a horizontal line from (0, height-1) to (width-1, height-1). Be aware that this will double the height of the picture.
Write a method to mirror a picture around a vertical line from (width-1, 0) to (width-1, height-1). Be aware that this will double the width of the picture.
Try to mirror a picture around a diagonal line from (0, 0) to (width-1, height-1). Try to mirror a picture around a diagonal line from (0, height-1) to (width-1, 0).
Write a method to rotate a picture to the right by 90 degrees.
Write a method to rotate a picture to the right by 180 degrees.
All of our copy methods copy rectangular areas. Try to write a copy method that copies a triangular area. Write one that copies a circular area.
We've seen that if you increment the source picture index by 2 while incrementing the target picture index by 1 for each copied pixel, you end up with the source being scaled down onto the target. What happens if you increment the target picture index by 2 as well? What happens if you increment both the source and target by 0.5 and use int to get just the integer part?
Write a method named createCollage to create a collage of the same image at least four times onto the 7x95in.jpg blank JPEG. (You are welcome to add additional images, too.) One of those four copies can be the original picture. The other three should be modified forms. You can do any of scaling, cropping, or rotating the image; creating a negative of the image; shifting or altering colors on the image; and making it darker or lighter. After composing your image, mirror it. You can do it vertically or horizontally (or otherwise), in any directionjust make sure that your four base images are visible still after mirroring.
Your single method should make all of this happenall of the effects and compositing must occur from the single function createCollage. Of course, it is perfectly okay to use other functions, but make it so that a tester of your program need only to call setMediaPath() and put all your input pictures in her mediasources directory, create a Picture object from the blank papersized file, and then execute createCollage()and will expect to have a collage generated and returned.
Think about how the grayscale algorithm works. Basically, if you know the luminance of anything visual (e.g., a small image, a letter), you can replace a pixel with that visual element in a similar way to create a collage image. Try implementing that. You'll need 256 visual elements of increasing lightness, all of the same size. You'll create a collage by replacing each pixel in the original image with one of these visual elements.