Subtopic Notes

1.2 Multimedia

1. Information representation

Bitmap Images

  • Pixel: Smallest picture element whose color can be accurately represented by binary
  • Data for a bitmapped image is encoded by assigning a solid color to each pixel, i.e., through bit patterns.
  • Bit patterns are generated by considering each grid row as a series of binary color codes corresponding to each pixel’s color.
  • These bit patterns are ‘mapped’ onto the main memory.
  • File Header: Stores the metadata of bitmap file; image size, color depth
  • Image Resolution
    • Number of pixels in an image
    • Image Resolution = width × height; E.g. 1920 × 1080 pixels
    • Image resolution increases → sharper/more detailed image
  • Screen Resolution
    • Number of pixels which can be viewed horizontally & vertically on the device’s screen
    • Number of pixels = width × height; E.g. 1680 × 1080 pixels
  • Color depth: Number of bits used to represent each color
    • An image with n bits has 2n colors per pixel
    • E.g. 16-color bitmap has 4 bits per pixel ∵ 24 = 16
    • Increased Color Depth → Increased Color Quality → Increased Size
  • File Size = Number of Pixels (Image Resolution) × Colour depth
  • Formats:
    • JPEG (.jpg or .jpeg) - Compressed format with lossy quality
    • PNG (.png) - Lossless format supporting transparency
    • GIF (.gif), BMP (.bmp), PSD (.psd), HEIF (.heic or .heif), ICO (.ico)
  • Applications: Scanned images and general computer usage

Vector Graphics

  • Made up of drawing objects
  • Drawing objects: A mathematically defined construct (of shapes like rectangle, line, circle, etc.)
  • Drawing List: Set of commands defining the vector
  • Properties: Basic geometric data which determine the shape and appearance (e.g color, stroke).
  • Data is encoded using mathematical formulas to generate properties in order to draw lines & curves to create the image
  • If object is resized, properties are recalculated
  • Applications: Logos and Icons
  • Formats:
    • SVG (.svg) - Scalable Vector Graphics: Widely-used web standard format supporting interactivity and animation.
    • EPS (.eps)
    • PDF (.pdf) – Portable Document Format
    • AI (.ai) – Adobe Illustrator format

Sound

  • Analogue data is continuous electrical signals whereas digital data is discrete electrical signals.
  • Sound signals are vibrations through a medium. Hence are analogue in nature as there can be infinite detail for sound.
  • Analogue signals converted (encoded) to digital signals by sampling:
    • Sound wave’s amplitude sampled at set time intervals
    • These samples are encoded as a binary number sequence
    • This provides a digital representation of the sound wave
  • Sampling Rate
    • Number of samples taken in a second
    • Unit: Hertz (Hz)
    • ↑ Sampling Rate = ↑ Accuracy = ↑ File size.7
  • Sampling Resolution
    • Number of bits per sample
    • ↑ Sampling Resolution = ↑ Accuracy = ↑ File size
  • Bit Rate
    • Number of bits for storing 1 second of sound
    • Bit Rate = Sampling Rate x Sampling Resolution
  • File Size = Bitrate x Length of Sound
    For Stereo sound (sound with two channels) file, multiply results by two
  • File Formats:
    • Musical Instrument Digital Format - MIDI (.mid): Stores musical performance data, such as notes, timings, and control signals, without including actual audio, allowing instruments or software to reproduce the composition
    • WAV (.wav), FLAC (.flac) - Uncompressed, High-quality
    • MP3 (.mp3) - Compressed format with lossy audio quality