-
Notifications
You must be signed in to change notification settings - Fork 0
/
part3.html
46 lines (36 loc) · 1.85 KB
/
part3.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
43
44
45
46
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>UW Oshkosh - CS 262 Fall 2020 - Assignment #1 - Part 3</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 3: Taking the negative</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 take the negative of a picture, you simply need to change
the color of each pixel in the following way: Change each one of the
three color component values to its complement with respect to the
maximum value of 255. For example, component values of 0, 10, 150, or
255 are replaced with component values of 255, 245, 105, or 0,
respectively. Implement the <code>convertToNegative()</code> method
that performs this transformation.<BR><BR>
Here is a sample result of calling your method. Taking the negative of
this picture twice:<BR><BR>
<center>
<img src="./pics/beachOriginal.jpg" width=300>
</center>
<BR><BR>
should produce the following two pictures:<BR><BR>
<center>
<img src="./pics/beachNegative.jpg" width=300>
<img src="./pics/beachOriginal.jpg" width=300>
</center>
<BR><BR> Note that taking the negative of a picture twice gives you
back the original picture. No information was lost in the
process. What happens when you brighten a picture repeatedly and then
darken it again? Do you always get the original picture back? Why or
why not? <BR><BR>
<P style="FONT-SIZE: 24px; TEXT-ALIGN: center"><a href="index.html">Back to the main assignment page</a></P>
</BODY>
</HTML>