-
Notifications
You must be signed in to change notification settings - Fork 0
/
part4.html
42 lines (31 loc) · 1.46 KB
/
part4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>UW Oshkosh - CS 262 Fall 2020 - Assignment #1 - Part 4</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR></HEAD>
<BODY style="BACKGROUND: #ccccee; font-size: 20px">
<TABLE style="FONT-SIZE: 32px">
<P style="FONT-SIZE: 36px; TEXT-ALIGN: center">CS 262 - Fall 2020 -
Assignment #1<br />
<span style="font-size: 30px;">Part 4: Converting to grayscale</span></P>
<P style="FONT-SIZE: 24px; TEXT-ALIGN: center"><a href="index.html">Back to the main assignment page</a></P>
In order to convert a picture to grayscale, you simply need to change
the color of each pixel in the following way: Compute the average
value of the three components and set each of the three color
component values to this average value. Implement the
<code>convertToGrayscale()</code> method that performs this
transformation.<BR><BR>
Calling your method on this picture:<BR><BR>
<center>
<img src="./pics/beachOriginal.jpg" width=300>
</center>
<BR><BR>
should produce the following picture:<BR><BR>
<center>
<img src="./pics/beachGray.jpg" width=300>
</center>
<BR><BR>
What is the effect of successive invocations of this method on the same picture and why?
<BR><BR>
<P style="FONT-SIZE: 24px; TEXT-ALIGN: center"><a href="index.html">Back to the main assignment page</a></P>
</BODY>
</HTML>