Encoding images, video and sound Flashcards
File types which reduce in quality when compressed
Lossy Files:
jpg(JPEG)
MPEG(video)
H.264(video)
MP3 (music)
File types which dont reduce in quality when compressed
Gifs
Tiff
PNG
JPEG
lossy/raster
most common image format
you can select a compression level (0-12), this means you can keep the quality but this also keeps a large file size
good for online photos with lots of different colours
-works by averaging the chromincance values over 2x2 pixel squares, then divides into 8x8 pixel blocks and compresses the info in each block as a unit
gif
lossless/raster
up to 256 colours ( not many colours, is a limitation)
good for animations, but this is used less so as the internet is a lot faster and can deal with video formats
allows transparancy (jpg does not)
each pixel represented by a byte.
png
lossless/ raster
standard for web images (good for large areas of solid limited colours)
can allow a small file size with limited colours
allows transparency
RAW files
original file
large file, with highest quality
not standardised, so some software cant read the file from certain cameras
raster files but not techincally images so need to be converted
EPS
vector image
mostly used for logos
can contain a raster image but this does not turn it into a vector image
SVG s
scalable vector graphics
defined by XML files
can be used with css for styling
popular for icons
specific uses
portable document format
vector format but can contain raster images
common for sending to print and useful as is near universal
can contain many different file formats
ADC
Analogue to digital converter - sound is a wave and is analogue so must be converted to a digital format
sample rate
digital sound depends on the sample rate, quality is increased with a higher sample rate
sampling sound examples
voice sampling (on a phone) is often 8000 samples per sec but cd is is 44100 samples per sec
lossless data compression example
zipping or archiving a file
how big are pixels
3 bytes, one for red, blue and green (RGB)
RGBA
an extension of RGB to include the transparency
how are red, green, blue, white and black represented in denary
Red - rgb(255,0,0)
Green - rgb(0,255,0)
Blue - rgb(0,0,255)
White - rgb(255,255,255)
black - rgb(0,0,0)
How are red, green blue, white and black represented in hex
red - 0xFF0000
green - 0x00FF00
blue - 0x0000FF
Black - 0x000000
white - 0xFFFFFF
What are videos compressed using
an MPEG, original film is digitised into a series of frames
frames in an MPEG
I-frames - they are encoded in their entirety
P-frames and B-frames occur between the I-frames and encode changes using relative coding
- reduce redundancy, same white background in the video results in less i frames
how frames in an mpeg work
I-frame - most data and act like a jpeg by averaging 8x8 pixel blocks
P-frames are compared with previous frames while b-frames are compared with previous and next frames (all areas that do not change are thrown away
how many bytes in an rgb pixel
3
how many bits in a pixel
24
what is the maximum value of each colour in denary, hex and binary
denary - 255
binary - (11111111)
hex - 0xFF
raster images
consists of a bitmap and its size is set by the resolution (number of pixels)
- allow for incredible detail if high res, but big file size
- includes jpeg, bmp, tiff and gif