CS 100 - Computer Literacy, Spring 2005
Homework 2 - Simple Image Collage
Due Date: Wednesday 3/9/2005 at 11:59 pm
For this assignment, you are to create a college based from
an image. The college should take an image, make three different
variations of the image and display the original picture
and all three variations in
a single image. The final image should be also be saved.
The final image should display the four variations in a
2-by-2 grid.
The first of the three variation is to be a black-and-white
version of your image. The remaining
two variations are to be black-and-X versions of the image.
One of these variations is to have X be a primary color, i.e.
red, green or blue. The other of these variation is have X be a secondary
color, i.e. yellow, magenta or cyan.
For example, if the original image is:
.
| The variation in black-and-white is:
.
|
The variation in black-and-green (using a primary color) is:
.
|
The variation in black-and-yellow (using a secondary color) is:
.
|
The complete college would be:
.
-
To create a black-and-white image, we set the values for red, green
and blue to be the same. Refer to lab 6
for more details.
- To create a black-and-red image, we set the value for red to the
same value as determined when creating a black-and-white image;
however we set the values of green and blue to zero.
- To create a black-and-green image, we set the value for green to the
same value as determined when creating a black-and-white image;
however we set the values of red and blue to zero.
- To create a black-and-blue image, we set the value for blue to the
same value as determined when creating a black-and-white image;
however we set the values of red and green to zero.
- To create a black-and-yellow image, we set the values for red and
green to the same value as determined when creating a black-and-white
image; however we set the value for blue to zero.
- To create a black-and-magenta image, we set the values for red and
blue to the same value as determined when creating a black-and-white
image; however we set the value for green to zero.
- To create a black-and-cyan image, we set the values for green and
blue to the same value as determined when creating a black-and-white
image; however we set the value for red to zero.
Note that for the primary colors of red, green and blue, only a single
color is used. While for the secondary colors of yellow, magenta
and cyan, two colors are used.
When completed, email your python code to the CS 100 instructor
account at i100@cs.uic.edu. Be sure to use an appropriate
subject line with your email.
We would like you to post the images you create on the
Homework 2
Posting Page on the CS 100 Swiki.
i100@cs.uic.edu
Department of Computer Science
University of Illinois at Chicago