Lab9
program with a main method.
bug_small.jpg
. Recall
that you need the full path to the picture. Where is it?
collage
that is blank
with dimensions 1024 pixels wide by 768 pixels high. Show it. Once you are sure
it shows a blank image properly comment out the line that shows it, so we
don't keep showing a copy of the blank image.
copyPicture
method from lab 8 to copy the picture of the
bug into the collage and show it.
Notice that most of the picture is empty space. What we're are going to do now is fill in the empty space with other picures or copies of the same picture creating a collage.
copyPictureXY
method that takes two
additional parameters x
and y
that are the upper left coordinate of where the picture should be
copied to. This method goes in Picture.java
. Here is an example of how
we would call copyPictureXY
.
orig.copyPictureXY(collage, 100, 100);
This copies orig
into collage
starting at coordinate (100,100) in collage.
copyPictureXY
method by copying another copy of the bug right next
to the first bug in the collage.
two_fish_small.jpg
to your collage.
Add it anywhere in the collage.
moose_small.jpg
to your collage.
grayScale
, extractRedChannelRed
,
extractBlueChannelBlue
,
and extractRedChannelRed
to create a whacked out collage using several
pictures from the folder of pictures on the T:
drive.
Here's mine. (Picture credits below).
mirrorVertical
method from homework 4 in your collage.
mirrorHorizontal
that is similar to
mirrorVertical
except that it mirrors the upper half of the image across
the horizontal axis.
Picture credits.
http://exultantmood.blogspot.com/2008/02/warning-this-contains-cute-kittens-and.html
http://www.framebox.de/creations/3d/bumblebee/