Skip to content

Instantly share code, notes, and snippets.

@JosmanPS
Created January 14, 2017 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosmanPS/aadc2e81bc6ad6ad72f32a712274389d to your computer and use it in GitHub Desktop.
Save JosmanPS/aadc2e81bc6ad6ad72f32a712274389d to your computer and use it in GitHub Desktop.
width = getWidth(picOriginal)
height = getHeight(picOriginal)
picCopy = makeEmptyPicture(width, height)
for x in range(0, width):
for y in range(0, height):
pixel = getPixel(picOriginal, x, y)
color = getColor(pixel)
copy_pixel = getPixel(picCopy, x, y)
setColor(copy_pixel, color)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment