Multimedia and Graphics: Pixels, Colour Depth, Audio and Video Size

Multimedia combines text, images, sound, video and animation, and computer graphics is the part that creates and stores pictures. Computer papers ask what a pixel is, how many colours a given colour depth gives, why vector drawings stay sharp, which colour model printers use and how large an image or sound file will be. Most of the sums use one idea: size in bits equals the number of samples or pixels multiplied by the bits each one needs.

Asked in: PPSC, FPSC, NTS, ETEA, KPPSC, SSC, IBPS and ICS/ECAT computer

Multimedia elements

The five basic elements of multimedia are text, images (graphics), audio, video and animation. Interactive multimedia lets the user control what happens, as in educational software, games and websites; hypermedia adds links between these elements.

Common software includes image editors (Adobe Photoshop, GIMP, Microsoft Paint), vector drawing programs (Adobe Illustrator, CorelDRAW, Inkscape), audio editors (Audacity) and video editors (Adobe Premiere Pro, DaVinci Resolve).

Pixels and resolution

A pixel (picture element) is the smallest dot of colour in a digital image or on a screen. Resolution is the number of pixels across and down, written width × height. Common screen resolutions are 1280 × 720 (HD), 1920 × 1080 (Full HD) and 3840 × 2160 (4K UHD); all three have an aspect ratio of 16:9.

For printing and scanning, resolution is given as pixel density: ppi (pixels per inch) or dpi (dots per inch). More pixels per inch gives finer detail.

Colour depth and image size

Colour depth (bit depth) is the number of bits used for each pixel. With n bits a pixel can show 2 to the power n colours: 1 bit gives 2 colours (black and white), 8 bits give 256 colours and 24 bits give 16,777,216 colours, called true colour. In 24-bit colour each of red, green and blue gets 8 bits, so 256 levels each.

The size of an uncompressed image is the number of pixels multiplied by the bits per pixel. Divide by 8 for bytes and by 1,024 for kilobytes. Doubling both the width and the height gives four times as many pixels, so four times the size.

Raster and vector graphics

A raster (bitmap) image is a grid of pixels. It is ideal for photographs, but when enlarged the pixels become visible and edges look jagged (pixelation). JPEG, PNG, GIF and BMP are raster formats, and Paint and Photoshop are raster editors.

A vector image stores shapes as mathematical descriptions of points, lines, curves and fills. It can be scaled to any size without losing sharpness and is usually small, so logos, fonts, maps and technical drawings use vectors. SVG, AI and EPS are vector formats, and Illustrator, CorelDRAW and Inkscape are vector editors.

RGB and CMYK colour models

RGB (red, green, blue) is an additive model used by screens, cameras and scanners, which emit light. Full red, green and blue together make white; red and green make yellow, green and blue make cyan, and red and blue make magenta. No light gives black.

CMYK (cyan, magenta, yellow, key = black) is a subtractive model used in printing, where inks absorb light. A separate black ink is used because mixing C, M and Y gives a muddy dark brown and wastes ink. Designs meant for print should be prepared in CMYK.

Digital audio

Sound is digitised by sampling: measuring the wave many times per second. The sampling rate is the number of samples per second, in hertz; audio CDs use 44.1 kHz. By the Nyquist rule, the sampling rate must be at least twice the highest frequency to be recorded, and since human hearing reaches about 20 kHz, 44.1 kHz is enough.

Bit depth is the number of bits per sample (16 bits on CD), and channels are 1 for mono and 2 for stereo. Uncompressed size = sampling rate × bit depth × channels × seconds, in bits.

Video and animation

Video is a sequence of still frames shown fast enough to look like motion. Frame rate is measured in frames per second (fps): cinema film uses 24 fps, the PAL TV standard used in Pakistan and India uses 25 fps, and NTSC uses about 30 fps.

Uncompressed video is huge: frame size × frame rate × seconds. Codecs such as H.264 compress it greatly. In animation, key frames mark the important positions and tweening (in-betweening) fills in the frames between them.

Solved examples

  1. How many pixels does a 1920 × 1080 Full HD screen have?
    1. Total pixels = 1920 × 1080.
    2. = 2,073,600 pixels, about 2 megapixels.
    Answer: 2,073,600 pixels
  2. How many different colours can a pixel show with 16-bit colour depth?
    1. Colours = 2 to the power 16.
    2. = 65,536 colours.
    Answer: 65,536 colours
  3. Find the size of an uncompressed 800 × 600 image in 24-bit colour, in bytes and in KB (1 KB = 1,024 bytes).
    1. Pixels = 800 × 600 = 480,000.
    2. 24 bits = 3 bytes per pixel, so size = 480,000 × 3 = 1,440,000 bytes.
    3. In KB: 1,440,000 ÷ 1,024 = 1,406.25 KB, about 1.37 MB.
    Answer: 1,440,000 bytes = 1,406.25 KB
  4. Zainab records 1 minute of CD-quality stereo sound: 44,100 Hz, 16-bit, 2 channels. What is the uncompressed size in bytes?
    1. Bits = 44,100 × 16 × 2 × 60 = 84,672,000 bits.
    2. Bytes = 84,672,000 ÷ 8 = 10,584,000 bytes, about 10.1 MB (1 MB = 1,048,576 bytes).
    Answer: 10,584,000 bytes
  5. Find the uncompressed size of a 10-second clip at 640 × 480, 24-bit colour, 25 fps (ignore sound).
    1. One frame = 640 × 480 × 3 = 921,600 bytes.
    2. Frames = 25 × 10 = 250.
    3. Size = 921,600 × 250 = 230,400,000 bytes, about 220 MB, which shows why video is always compressed.
    Answer: 230,400,000 bytes
  6. Arjun must design a college logo that will appear on a visiting card and on a large banner, and the banner will be printed. Which type of graphic and which colour model should he use?
    1. The logo must be enlarged without blurring, so a vector graphic is needed; a raster logo would pixelate on the banner.
    2. Printing uses inks, so the final file should be prepared in CMYK; RGB is for screens.
    Answer: Vector graphic, CMYK colour model

Exam shortcuts

Common mistakes

Practice MCQs

  1. What is the smallest single element of colour in a digital image called?
    A) Bit
    B) Frame
    C) Vector
    D) Pixel
    Answer: D) Pixel — A pixel (picture element) is the smallest dot of colour in a digital image. A bit is a binary digit of data, a frame is one complete picture in a video, and a vector is a shape described mathematically.
  2. Which colour model is used by computer monitors and mobile phone screens?
    A) CMYK
    B) RGB
    C) RYB
    D) Greyscale
    Answer: B) RGB — Screens give out light and mix red, green and blue light additively, so they use RGB. CMYK is for printing with inks, RYB is the traditional painters’ model, and greyscale shows only shades of grey.
  3. Which type of graphic can be enlarged to any size without losing sharpness?
    A) Vector graphic
    B) Raster graphic
    C) Bitmap image
    D) JPEG photograph
    Answer: A) Vector graphic — A vector graphic is stored as mathematical shapes that are redrawn at any size, so it stays sharp. Raster graphics, bitmaps and JPEG photos are grids of pixels that become blocky when enlarged.
  4. In the CMYK colour model used for printing, what does K stand for?
    A) Kelvin
    B) Contrast
    C) Black (key)
    D) Brightness
    Answer: C) Black (key) — K is the key colour, black, printed with its own ink because mixing cyan, magenta and yellow gives a muddy dark brown. Kelvin, contrast and brightness are not inks in the model.
  5. How many different colours can be shown with a colour depth of 8 bits per pixel?
    A) 8
    B) 64
    C) 256
    D) 255
    Answer: C) 256 — With 8 bits there are 2 to the power 8 = 256 possible values, so 256 colours. 8 is just the number of bits, 64 is 2 to the power 6, and 255 is the largest value, not the number of values, since 0 is also a colour.
  6. In the additive RGB model, what colour do full-strength red and green light produce together?
    A) Yellow
    B) Brown
    C) Cyan
    D) Magenta
    Answer: A) Yellow — Adding red and green light gives yellow. Brown is what mixing red and green paint gives, cyan comes from green and blue light, and magenta comes from red and blue light.
  7. What frame rate is traditionally used for cinema film?
    A) 12 frames per second
    B) 50 frames per second
    C) 100 frames per second
    D) 24 frames per second
    Answer: D) 24 frames per second — Cinema film has long used 24 frames per second, enough for smooth motion. 12 fps looks jerky, and 50 or 100 fps are not the traditional film standard.
  8. How many pixels does a 1280 × 720 HD display have?
    A) 2,000
    B) 921,600
    C) 92,160
    D) 1,843,200
    Answer: B) 921,600 — 1280 × 720 = 921,600 pixels. 2,000 adds the two numbers instead of multiplying, 92,160 is ten times too small, and 1,843,200 is double the correct value.
  9. Shabnam makes a 3-minute animation that plays at 25 frames per second. How many frames does it contain?
    A) 75
    B) 1,500
    C) 7,500
    D) 4,500
    Answer: D) 4,500 — Three minutes is 180 seconds, and 180 × 25 = 4,500 frames. 75 multiplies 3 by 25 without converting minutes to seconds, while 1,500 and 7,500 use the wrong number of seconds.
  10. How many colours can be shown with 24-bit true colour?
    A) 16,777,216
    B) 65,536
    C) 16,777,215
    D) 4,294,967,296
    Answer: A) 16,777,216 — 2 to the power 24 = 16,777,216 colours. 65,536 is for 16 bits, 16,777,215 is the largest value rather than the count of values, and 4,294,967,296 is for 32 bits.
  11. What is the size of an uncompressed 1024 × 768 image with 8-bit colour depth, taking 1 KB = 1,024 bytes?
    A) 96 KB
    B) 2,304 KB
    C) 768 KB
    D) 6,144 KB
    Answer: C) 768 KB — Each pixel takes 1 byte, so the size is 1024 × 768 = 786,432 bytes, and 786,432 ÷ 1,024 = 768 KB. 6,144 KB forgets to divide bits by 8, 2,304 KB would be 24-bit colour, and 96 KB divides by 8 one time too many.
  12. A voice recording contains frequencies up to 8 kHz. By the Nyquist rule, what is the minimum sampling rate needed?
    A) 4 kHz
    B) 16 kHz
    C) 8 kHz
    D) 32 kHz
    Answer: B) 16 kHz — The sampling rate must be at least twice the highest frequency: 2 × 8 = 16 kHz. 4 kHz and 8 kHz are too low and would lose the high sounds, and 32 kHz works but is not the minimum.
  13. The width and height of an uncompressed image are both doubled while the colour depth stays the same. What happens to the file size?
    A) It becomes four times as large
    B) It stays the same
    C) It doubles
    D) It becomes eight times as large
    Answer: A) It becomes four times as large — Doubling both dimensions gives 2 × 2 = 4 times as many pixels, each needing the same number of bits, so the size becomes four times as large. It would only double if one dimension changed, and eight times would need a third factor of 2.
  14. Ravi records 30 seconds of mono sound at 22,050 Hz with 8-bit samples. What is the uncompressed size?
    A) 330,750 bytes
    B) 1,323,000 bytes
    C) 5,292,000 bytes
    D) 661,500 bytes
    Answer: D) 661,500 bytes — Size = 22,050 × 8 × 1 × 30 ÷ 8 = 661,500 bytes. 5,292,000 is the size in bits, 1,323,000 bytes would be stereo or 16-bit, and 330,750 bytes is half the correct value.
  15. What is the uncompressed size of a 2-minute stereo recording at 44,100 Hz and 16 bits per sample, taking 1 MB = 1,000,000 bytes?
    A) 10.584 MB
    B) 21.168 MB
    C) 42.336 MB
    D) 169.344 MB
    Answer: B) 21.168 MB — Bytes = 44,100 × 2 bytes per sample × 2 channels × 120 seconds = 21,168,000 bytes = 21.168 MB. 10.584 MB treats it as mono, 42.336 MB counts the channels twice, and 169.344 MB is the size in megabits.

Questions

What is the difference between ppi and dpi?

ppi (pixels per inch) describes how densely pixels are packed in a digital image or screen, while dpi (dots per inch) describes how many ink dots a printer places per inch. Both measure detail; higher means finer.

Why are photos raster but logos vector?

Photos have smooth, complex colour changes that pixels capture well. Logos are made of simple shapes that must stay sharp at every size, which vectors do best.

Why do real image and audio files come out smaller than the formulas give?

The formulas give uncompressed sizes. Formats such as JPEG, PNG, MP3 and MP4 compress the data, often to a small fraction of that size.

Why does a design look different when printed?

Screens mix light in RGB and can show some bright colours that CMYK inks cannot reproduce, so colours often look duller in print unless the design is prepared in CMYK.