Thursday, November 24, 2011

Assignment 33 Encoding Images

1. An image is 800 by 500 pixels, and each pixel can be one of four colors. How much memory would it require?

     4 colors would mean its a 2 bit code:
     500 X 800  = 400,000 pixels
     2 X 400,000 = 800,000 bits
     800,000 / 8 =  100,000 bytes
     100 KBytes in memory

2. An image is 800 by 500 pixels, and each pixel can be one of four colors. How much storage space would it require?
     4 colors would mean its a 2 bit code:
     500 X 800  = 400,000 pixels
     2 X 400,000 = 800,000 bits
     800,000 / 8 =  100,000 bytes
     100 KBytes of storage


3. How many different colors could one represent using two, three and four bit codes?

     2 bits of code give the user 4
     3 bits of code give the user 8
     4 bits of code give the user 16

4. When you add one bit to a code, what happens to the number of possible colors?
     It doubles the number of combinations of colors.

No comments:

Post a Comment