In this lab you are going to practice shrinking and enlarging pictures.
Lab11
that shows the gnat.jpg
picture from the CS140 gallery folder.
shrink
method we designed in lecture today and use it
on your picture above and display it. In which class and file does this method go?
Picture
method enlarge
that enlarges a picture by
doubling the width and height. Use the technique we discussed in class.
enlarge
method on the picture two_fish.jpg
. Show
both the original picture and the enlarged picture. Look at the quality of
the enlarged picture. What do you notice as compared to the original picture?
two_fish.jpg
picture
(you are probably already doing this from the step above).
two_fish.jpg
. (Don't bother showing it).
enlargeX
that takes an additional
integer parameter x
and enlarges
the width and height of the picture x
times. For example the
call p.enlarge(big, 3);
should enlarge p
3 times placing the result in big
.