This lab assignment will have you write at least two methods in java that will create a new image that will show a portion from another image. This technique is called cropping.
Cropping of an image is to take a certain part of image and discard the rest of the image. Once the user has picked an image, we shall create an empty image which will store the resulting cropped image. Then we shall copy the pixels from the part of the original to the new image. "Copying the pixels" is nothing but copying the colors of pixels from original image to the new image. We have done cropping during lecture in Lect1021f.java.
Create a Java program that will:
Each call will send the image selected but must crop a different section of the image and crop a different sized section image. You are to crop an interesting item from the original image and not just some random location. You will also be required to submit your image with your JES program file. The BlendIn.jpg image offers a few interesting spots that could be cropped. You may use this image or any other image of your choosing. You may wish to use the picture explore() method to help find the x and y coordinates of different interesting sections of an image.
To use the UNIX turnin command to electronically hand-in your html file using the project name of lab10. To submit the files in lab10.java and BlendIn.jpg for lab10, the turnin command is entered as:
turnin -c cs101 -p lab10 lab10.java BlendIn.jpgTo verify what you submitted using the turnin command type:
turnin -c cs101 -p lab10 -v