1. Computers, Art, and Pixels


(gentle happy music)

Hi, this is Sarah.

Welcome to Day Six of Scratch Art.

Last time we learned about a conditional called the if statement.

Today you will use another conditional called if else to make a program that scans an image and makes a shadow.

An if statement reads, if a condition happens then do this action.

An if else statement represents an either or option.

If the first condition is met, then it will do the first option.

If the first condition is not met, or else, it will do the second option.

For today's project the shadow should be black if the picture is black, but otherwise, or else, something still needs to happen.

The shadow should be white.

An if alone wouldn't allow for both options.

Pictures displayed on a computer screen are made up of millions of little squares called pixels.

When the human eye takes in all these little squares together, it sees them as one complete picture.

Computers make it easy to change the look of a picture or photograph because they can manipulate each tiny pixel individually.

Apps and photo editing tools, like Instagram, apply specific digital effects to photos using a process similar to the one you will use today.

Sometimes called filters, these effects include making photos black and white, altering the color scheme, or selectively changing portions of a photograph.

Editing tools like Photoshop can reduce red eye, make a background transparent, and sharpen images.

The computer tests each pixel in the photo and changes it to create the different effects.

The if else conditional statement allows computers to make these effects.

In this example, the computer applies the selective color effect.

It scans the color of each pixel.

If the color matches the one it is programmed to bring out it keeps that color, else it grays out the color.

In this picture the program keeps the vibrant yellow color while the other colors are grayed out.

These editing tools were created with computer science.

Before these kinds of tools existed artists had to painstakingly apply color to film or paint out mistakes.

With computers, these corrections can be made instantly.

In today's project you will program a filter that scans images to make silhouettes or shadows.

Now it's your turn.

Open the starter project, click Remix, and sign in.

Then proceed to the next video.


Open the starter project.
  • "Film strip" by Bart ( -- Licensed by CC BY 2.0 ( -- Image scaled up, cropping edges
  • "Sympetrum flaveolum - side (aka)" by André Karwath ( -- Licensed by CC BY-SA 2.5 ( -- Images sharpness edited in Photoshop
  • "MINja Tutorials | Photoshop Tutorial | Selective Coloring" by MinjaTutorials ( -- Licensed by Creative Commons Attribution 3.0 Unported ( -- Video trimmed to needed length | Audio removed