psajja10

Navigation

Recent site activity

Media 1

Redlines
name=pickAFile()
pic=makePicture(name)
show(pic)
color=makeColor(255,0,0) #red
width=getWidth(pic)
height=getHeight(pic)
row=1
while row < width:
  col=1
  while col < height:
    pixel=getPixel(pic,row,col)
    setColor(pixel,color)
    col=col+2
  row=row+1
  repaint(pic)

Original

Red Lines

Sunset Picture
name=pickAFile()
pic=makePicture(name)
show(pic)
width=getWidth(pic)
height=getHeight(pic)
row=1
while row < width:
  col=1
  while col < height:
    pixel=getPixel(pic,row,col)
    blue = getBlue(pixel)
    mynewcolor=(blue-85)
    setBlue(pixel,mynewcolor)
    red = getRed(pixel)
    mynewcolor=(red-75)
    setRed(pixel,mynewcolor)
    green= getGreen(pixel)
    mynewcolor=(green-75)
    setGreen(pixel,mynewcolor)
    col=col+1
  row=row+1
  repaint(pic)

Original
Sunset


Black and White Photograph

name=pickAFile()
pic=makePicture(name)
show(pic)
width=getWidth(pic)
height=getHeight(pic)
row=1
while row < width:
  col=1
  while col < height:
    pixel=getPixel(pic,row,col)
    x = getBlue(pixel)
    y = getGreen(pixel)
    z = getRed(pixel)
    intensity = (x+y+z)/3
    setBlue(pixel,intensity)
    setGreen(pixel,intensity)
    setRed(pixel,intensity)
    col=col+1
  row=row+1
  repaint(pic)

Original

Black and White

Text


Welcome!

Mirror

name=pickAFile()
pic=makePicture(name)
show(pic)
width=getWidth(pic)
height=getHeight(pic)
row=1
while row < height:
  col=1
  endcol=width
  while col < width:
    pixel=getPixel(pic,col,row)
    endPixel=getPixel(pic,endcol,row)
    color=getColor(pixel)
    setColor(endPixel,color)
    col=col+1
    endcol=width-col
  row=row+1
  repaint(pic)

Original

Mirror