CS 101 - Introduction to Computing, Fall 2008

Lab 10

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.

Lab Assignment 10

Due: Thursday 11/7/2008 by 11:59 pm

Create a Java program that will:

  1. Contain a comment indicating

  2. Contain the main() method that will

  3. Contain a method called cropImage () that will: This method may call other methods that are built-in or that you have written. Note that the code given in lecture is close to what is needed here but it is not exact. If any of the verify checks fail, print out a good error message and return from the function.

Submittal of the Lab Assignment