CS42
Table of Contents
Book Index
Scratch ActiveCode
Instructor's Page
Edit Profile
Change Password
Register
Login
Navigation Help
Help for Instructors
About Runestone
Report A Problem
Page
The Dress
The Dress
ΒΆ
What’s the dress?
Context
Take me to the first topic!
Reasoning
View the
Table of Contents
from processing import * gg = '' def setup(): global gg size(600,800) gg = loadImage('../_static/dress.jpeg') noLoop() def scale(inp, small, most): # TODO: Scale return inp def draw(): image(gg,0,0) for i in range(gg.width): for j in range(gg.height): p = get(i,j) r = red(p) g = green(p) b = blue(p) #p = color(scale(r,134,255),scale(g,134,255), scale(b,134,255)) set(i,j,p) run()
(dress)
Run