Monday, November 26, 2012

Image encoding




1.       
The number of pixels: 800 x 500=400,000
2 bits to represent 4 colors
1 pixel can be one of 4 colors => 1 pixel costs 2 bits
=> 400,000 x 2 =800,000 bits
=> 800,000 /8 =100,000 Bytes = 100 kB
  The image requires 100 kB of memory.
2.      It would require 100 kB of storage
3.      If we use two, three, and four bit codes, we would have four, eight, and sixteen different colors respectively.
4.      When I add one more bit to a code, the number of possible colors doubles. For example, I have sixteen different colors when using a four bit code. If I add one more bit to my four bit code, I would have thirty two different colors.

No comments:

Post a Comment