📘 CodingMarble Learn

Digital Media: How Pictures, Sound and Video Become Numbers

Digital media is any picture, sound, video or animation stored as numbers on a computer. A raster image is a grid of pixels, each stored as red, green and blue values from 0 to 255. Vector graphics store shapes as maths, so they stay sharp at any size. Video and animation are many frames shown quickly. File size grows with resolution and colour depth, so we use compression. When we make or share media we must respect copyright, licences and people's image rights, and work safely and critically.

🎬 Step-by-step story

  1. A digital picture is a grid of tiny squares called pixels. Our sun has 8 × 8 = 64 of them.
  2. Each pixel is stored as three numbers: red, green and blue, from 0 to 255. Mixing them makes any colour.
  3. Raster images go blocky when you zoom in. Vector images store shapes as maths, so they stay smooth.
  4. Video and animation are many still frames shown fast. About 24 frames per second looks smooth.
  5. Every pixel needs 3 bytes, so big photos are huge. Compression like JPEG makes them much smaller.
  6. Free play: change the resolution and the colour, and watch the file size change.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why do photos have so many pixels?

More pixels mean finer detail. With only 64 pixels the sun looks rough; try 16 per side in free play.

How can three numbers make millions of colours?

Each of R, G and B has 256 levels, so 256 × 256 × 256 ≈ 16.7 million mixes.

Why don't we make everything as vectors?

Photos have millions of tiny colour changes that cannot be described as simple shapes, so they stay raster.

How does a video move if each frame is still?

Frames are shown so fast that our eyes blend them into motion.

Why is my phone photo only 3 MB if the sum says 36 MB?

JPEG compression removes detail our eyes hardly notice, often making files about 10 times smaller.

What is digital media? Pixels and colour

Digital media means pictures, sound, video, animation, games and web pages stored as numbers (binary 0s and 1s). Because they are numbers, they can be copied, edited and shared instantly. Social media apps let anyone publish digital media to many people.

A digital photo is a raster (bitmap) image: a grid of pixels (picture elements). Each pixel has one colour.

RGB colour

Screens mix red, green and blue light. Each is stored as a number from 0 to 255 (one byte each, 24-bit colour). R 255, G 0, B 0 is pure red; all 255 is white; all 0 is black. That gives 256 × 256 × 256 ≈ 16.7 million colours. Printers use CMYK inks instead (cyan, magenta, yellow, black).

Resolution is how many pixels an image has, such as 1920 × 1080. More pixels = more detail, but a bigger file.

Raster and vector graphics, digital painting

Raster (bitmap)Vector
StoresColour of every pixelShapes as maths: points, lines, curves, fills
Zoom inGets blocky (pixelated)Stays sharp at any size
Best forPhotos, digital paintingLogos, icons, fonts, diagrams
FormatsJPEG, PNG, GIFSVG, PDF, AI

Digital painting uses a tablet and stylus with brushes, layers and undo. Layers let you change one part without spoiling the rest. Photo editing tools can crop, adjust brightness and contrast, and retouch, which is also why we must be careful about believing edited images.

Sound, video and animation

Digital sound is made by measuring (sampling) the sound wave many times a second. Music CDs use 44,100 samples per second. More samples and more bits per sample = better quality and bigger files.

Video is a series of still images called frames. Film uses about 24 frames per second (fps); phones often use 30 or 60. Our eyes blend fast frames into smooth motion.

Animation makes frames by drawing (2D), by posing 3D models, or by stop-motion photos. Keyframes mark the main poses; the software fills in the frames between (tweening).

Interactive media (games, websites, installations) changes when the user acts: clicks, touches, moves. A good project is planned, built, tested and improved again and again (iterative design).

File size, compression, copyright and safe work

Image file size (uncompressed) = width × height × bytes per pixel. A 1920 × 1080 image with 3 bytes per pixel = 6,220,800 bytes ≈ 6.2 MB.

Compression makes files smaller. Lossless (PNG, ZIP) keeps every detail. Lossy (JPEG, MP3, MP4) throws away details our eyes and ears hardly notice, so files become much smaller.

Copyright and image rights

Working well

Take breaks from the screen (the 20-20-20 rule: every 20 minutes look 20 feet, about 6 m, away for 20 seconds), sit with a straight back, and back up your files. Judge your own work honestly: does it meet the brief? What would you improve next time?

Key formulas and definitions

Worked examples

1. An image is 800 × 600 pixels. How many pixels does it have?

800 × 600 = 480,000 pixels.

2. What colour is RGB(255, 255, 0)?

Full red + full green light + no blue = yellow.

3. Find the uncompressed size of a 1000 × 500 image in 24-bit colour.

Pixels = 1000 × 500 = 500,000. Bytes = 500,000 × 3 = 1,500,000 bytes = 1.5 MB.

4. A 10-second animation runs at 24 fps. How many frames must be made?

Frames = 24 × 10 = 240 frames.

5. A school wants a logo for banners, badges and the website. Raster or vector?

Vector. It must be printed huge on banners and tiny on badges, and a vector stays sharp at every size.

6. A 4000 × 3000 photo is 36 MB uncompressed and 3.6 MB as JPEG. What is the compression ratio?

4000 × 3000 × 3 = 36,000,000 bytes = 36 MB. Ratio = 36 ÷ 3.6 = 10, so 10 : 1.

Common mistakes

Practice quiz

1. A pixel is:
2. Which stays sharp when made very large?
3. RGB(0, 0, 0) is:
4. A 5-second clip at 30 fps has how many frames?
5. Lossy compression:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is digital media?

Any pictures, sound, video, animation, games or web content stored and shared as numbers on computers.

What is the difference between raster and vector graphics?

Raster stores a grid of coloured pixels and gets blocky when enlarged; vector stores shapes as maths and stays sharp at any size.

How do you calculate image file size?

Width × height × bytes per pixel. A 24-bit colour image uses 3 bytes per pixel.

Where this is taught

NetherlandsVWO 3 (onderbouw)Data, AI and society
PolandLiceum ogólnokształcące, klasa IMusic in multimedia
Spain1º BachilleratoFormal elements and expressive power of image and audiovisual language
Spain1º BachilleratoDigital technologies and tools
Ukraine10 класPractical modules (school chooses one or more)
Ukraine11 класPractical modules (school chooses one or more)
CBSE (India)Class 12New Media
England (GCSE, A level)Year 103.3 Fundamentals of data representation
Japan高校(専門学科)1〜3年Using Networks
Japan高校(専門学科)1〜3年Marine Information Technology
FranceSecondeThemes
FrancePremièreLab physical and chemical sciences (option)
China高三Selective 6: Modern media art

Learn next

Related lessons

All Computer Science lessons