Rocket opens the data file behind one snapshot pixel. Instead of a color, he finds three numbers in a row.
"Red, green and blue," Raven reads over his shoulder. "Every single pixel gets all three."
Rocket scrolls down. "Here is one that says 255, 255, 255. And here is one that says 0, 0, 0."
"The first one is a blazing white star," Nova says. "The second is the empty black sky around it."
Raven starts a list of the biggest and smallest numbers in the file.
"So brightness is hiding in the numbers," Rocket says. "That might be something Sky Sorter can use."
A screen makes each pixel's color by mixing red, green and blue light.
So a computer stores three values for each pixel: a red value, a green value and a blue value.
Each value runs from 0 to 255.
All three values at 255 make white. Lower values make a pixel darker, down to pure black at 0.
| Pixel | Red | Green | Blue | What it looks like |
|---|---|---|---|---|
| 1 | 255 | 255 | 255 | White, like a blazing star |
| 2 | 0 | 0 | 0 | Black, like empty sky |
| 3 | 120 | 120 | 120 | Darker than 1, lighter than 2 |
Three numbers from 0 to 255 per pixel is a lot to write by hand.
So the crew's paper snapshot cards use a simpler encoding: one brightness value per pixel.
It uses the same 0 to 255 scale, from 0 for black up to 255 for the brightest white.
This one-value code is the crew's own shortcut. It keeps brightness but throws away color detail.
Choosing an encoding is a trade-off. Simpler codes are faster to use but keep less information.
| Statement | True or false? |
|---|---|
| A computer stores a red, green and blue value for each pixel. | ? |
| Higher values make a pixel darker. | ? |
| The crew's one-value brightness code keeps all the color detail. | ? |
| A simpler encoding always keeps more information. | ? |
Nice decoding. Tomorrow's Explorer Lab turns brightness values back into a snapshot.