Tuesday, 15 February 2011

Bitmaps, Vectors and Compression Techniques

Bitmaps
These are mapped array of bits. The array is made up by 1's and 0's which when arranged create a shape like so:

for more colours more bits per colour would have to be assigned to each pixel.
A pixel being the smallest addressable point of an image.

Problems with bitmaps: Bitmaps take up alot of space to store e.g.
A true colour (24 bit) bitmap taken on a 7MP camera: 
7MP = 7,000,000 pixels
Using 24 bits per pixel = 168,000,000 bits
=  21,000,000 Bytes
= 21,000 KB
= 21MB!
Vectors
Vectors unlike bitmaps don't store a picture as mapped arrays. Vectors use geometric information and properties) needed to recreate an image.
e.g.

Bitmap file
1111111111111111111111111111111111111111…….7 million times = 20MB!
Vector file
Rect(0,0, 2700, 2700, black, filled, none)
= just a few bytes!


The advantage of using vectors information on how to make the picture (not the actual picture itself is that firstly it takes less space to store (quicker to load too!), and that we can scale these images well without it sstarting to pixelize like a bitmap. This is because to make a larger image with a vector the property given for the size to the computer would just need to be increased and it could recreate the image, but with a bitmap it would have to assign more pixels which need more colours(which colours). These colours would need to be interpolated(higher form of averaging).
The only disadvatage of using a vector is that for the computer to create instruction to make an image it has to see you make it (you would a specific type of program to create a vector).



Compression Techniques
we have 2 options for compressing an image.
1) lossless compressing. This is compressing the image without lossing any information:
 Run Length Encoding (RLE) replaces continuous blocks with just the colour and the number of blocks

2)Lossy compressing. This is a form of compression that losses information.
Remove bits we find hard to see/won’t notice (JPEG) - Every time you save a JPEG again as a JPEG you lose more information!

 

1 comment:

  1. Good summary well done - you could have mentioned how we split up colour depth into three RGB values

    ReplyDelete