Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more.

https://storage.googleapis.com/files.cs-first.com/art/art-icon%402x.png

1. Computers, Art, and Pixels

Transcript

(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.

Instructions
  1. Remix the Starter Project.
  2. Sign in to Scratch.
Attributions
  • "Film strip" by Bart (https://commons.wikimedia.org/wiki/File:Film_strip.jpg) -- Licensed by CC BY 2.0 (https://creativecommons.org/licenses/by/2.0/) -- Image scaled up, cropping edges
  • "Sympetrum flaveolum - side (aka)" by André Karwath (https://commons.wikimedia.org/wiki/File:Sympetrum_flaveolum_-_side_(aka).jpg) -- Licensed by CC BY-SA 2.5 (https://creativecommons.org/licenses/by-sa/2.5/deed.en) -- Images sharpness edited in Photoshop
  • "MINja Tutorials | Photoshop Tutorial | Selective Coloring" by MinjaTutorials (https://www.youtube.com/watch?v=BgNKIwTKIFQ) -- Licensed by Creative Commons Attribution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/legalcode) -- Video trimmed to needed length | Audio removed