Image-10 Advanced Bluescreen

< CS101

Here we'll look at more advanced Bluescreen techniques.

All About The Color

Color - our if-logic to replace or blend pixels only uses color.

Bluescreen Multi-Pass - You Try It


image-bluescreen2-1

 

Solution code:

  // Your code here
  if (pixel.getBlue() > avg * 1.2) {  // if-blue
    pixel2 = back2.getPixel(pixel.getX(), pixel.getY());
    pixel.setRed(pixel2.getRed());
    pixel.setGreen(pixel2.getGreen());
    pixel.setBlue(pixel2.getBlue());
  }

Experiments With The Two Ifs

Answer:

When stanford is put in by if-red, the sky result is just
as blue as the other sky.
All the blue pixels are replaced by the if-blue which follows.
This only happens if if-blue goes second.

Post-Processing Paint

Here we have banana.jpg
yellow banana with red bricks

On the Mac, Preview has a primitive edit mode. 1. make a copy of your original file first, so you don't mess up the original. Open the copy in Preview. 2 Click the pencil to enter edit mode. 3 Click the circle to draw circles. 4 Click the colors, selecting blue and also a fill-color of blue. Draw/arrange blue circles or whatever. Windows has a similar simple paint program.

yellow banana with blue circles painted in post


image-bluescreen2-2

 

> exercises