Week 2 - Image formats Flashcards
Why do we use image formats?
To be able to save image data for future manipulation or display in a consistent manner
Formats enable standardisation and the use of graphical data by more than one application
What are the two types of graphical information?
Bitmaps (raster or pixel maps)and vectors
What are bitmaps?
Images made up of pixels in a grid
Advantages of bitmaps
Works with sampled images produced by real world applications
Good at representing complex variation in colour, shades and shapes
What type of compression does GIF use?
Lossless
What is the disadvantage of a GIF?
Only a 256 colour palette
What is GIF?
One of the two widely used image formats.
What is GIF best for?
line-art images - icons, graphs, line-art logos
Why are GIFs useful?
Allow for transparency by allowing you to pick one colour from the colour map to be transparent
What are animated GIFs?
Produced by displaying many images sequentially - Not good for longer/larger animations but works well with simple ones
What is the GIF screen descriptor?
Describes the overall parameters for GIF images in the file
Placement of image in the space of the GIF
Flags to define colour map and whether there is transparency
GIF Screen descriptor - What is M?
1 if global colour map follows descriptor
GIF Screen descriptor - What is CR?
Bits per pixel in imge
GIF Screen descriptor - What is S?
Whether global colour table is sorted
GIF Screen descriptor - What is Size?
Size of the global colour table
GIF Screen descriptor - What is Background?
The index of background colour in the global colour table
GIF Screen descriptor - What is Aspect Ratio?
Aspect ratio of the pixels in GIF
What is the GIF global colour map?
A colour table of bytes representing values of red, green, blue which are used for the GIF
What are the two types of compression?
Lossy and lossless
What is an example of lossless compression?
Run length code - Stores numbers of alternating values of bits
What is lossless compression?
Compression by organising data better or storing it more appropriately
Rarely gives compression better than 2:1
No loss of data
What is Lossy compression?
Removes data that is not noticeable by humans - uses the properties of human sensory system - vision and hearing e.g. the eye is poor at differentiating differences of chrominance
When is compression most effective?
When lossy and lossless compression is applied
What are JPEGs?
High quality true colour images - full-colour unlike GIFs
What is the compression rates of JPEGs?
30:1 with true colour images
What is the first stage of JPEG image compression?
Convert RGB to Brightness and chrominance - Y, Cb, Cr
Eye is less sensitive to changes in colour than changes in brightness
Lossless compression
What is the second stage of JPEG compression?
Colour/Chroma info is subsampled by a factor of 2
What is the third stage of JPEG compression?
Image is split into 8x8 blocks and Discrete Cosine Transform
(DCT) is applied - Converts spatial data into frequency components i.e. intensity converted to frequency
What is the fourth stage of JPEG compression?
Frequency data is quantized
Human eye is very sensitive to small variations of brightness/colour but less to high frequency changes
What is the fith stage of JPEG compression?
More repetition in the data quantized
Data is Huffman compressed
What is PNG?
Image format that uses lossless compression which is replaced GIF
Handles true colour images
Better quality reproduction than GIF but no animation
What is TIFF?
Image format that has lossless or no compression used to transfer image data without data loss