Questions
- What is the row index for the top left corner of the picture?
- What is the column index for the top left corner of the picture?
- The width of this picture is 640. What is the right most column index?
- The height of this picture is 480. What is the bottom most row index?
- Does the row index increase from left to right or top to bottom?
- Does the column index increase from left to right or top to bottom?
- Set the zoom to 500%. Can you see squares of color? This is called pixelation. Pixelation means displaying a picture so magnified that the individual pixels look like small squares.
Homework:
Picture Lab Activity 3
Exercises
- Modify the main method in the PictureExplorer class to create and explore a different picture from the images folder.
- Add a picture to the images folder and then create and explore that picture in the main method. If the picture is very large (for instance, one from a digital camera), you can scale it using the scale method in the Picture class.
For example, you can make a new picture (“smallMyPicture.jpg” in the images folder) one-fourth the size of the original (“myPicture.jpg”) using:Picture p = new Picture("myPicture.jpg"); Picture smallP = p.scale(0.25,0.25); smallP.write("smallMyPicture.jpg");