Thursday, January 28, 2010

Question 1

An 800 x 600 image with 24-bit colour depth needs to be stored on disc. Even though the image might contain 2^24 (2 in the power of 24) different colours, only 256 colours are actually present. This image could be encoded by means of a table (palette) of 256 24-bit elements and, for each pixel, an index of its RGB value in the table. This type of encoding is usually called Colour Look Up Table (CLUT) encoding.

a) How many bytes are needed to store the image raw information?

Given,
Image Resolution (R) = 800*600 pixel
Colour Depth (D) = 24 bits/pixel (i.e. 3 bytes/pixel)
We have,
Size of an image = R*D
i.e. 800*600*3 bytes
= 1440000 bytes

Therefore, 1440000 bytes are required to store the image raw information.

b) How many bytes are needed to store the image using CLUT encoding?

Given,
Image Resolution (R) = 800*600 pixel
Colour Depth (D) = 24 bits/pixel (i.e. 3 bytes/pixel)
No of available colours (N) = 256 (i.e. )
Therefore, Size of each pixel (D1) = 8 bits (i.e. 1 byte)

We have,
Size of Image = R*D1
i.e. 800*600*1 bytes
= 480000 bytes
And,
Size of Pallet Map (table) = N*D
i.e. 256*3 bytes
= 768 bytes

Therefore,
Total size required to store the image using CLUT encoding =
Size of Image + Size of Pallet Map
i.e. 480000 bytes + 768 bytes
= 480768 bytes.



c) What's the compression ratio achieved by using this simple encoding method?
The compression ratio achieved by using this simple encoding method is
Total size of image using CLUT : Size of image raw information
i.e. 480768 : 1440000
= 1 : 3 (approximately)

References:
HSC Online. Calculating image file size. Retrieved from http://www.hsc.csu.edu.au/ipt/mm_systems/3289/image_file_size.htm, January 2010.
Wikipedia. Indexed Color. Retrieved from http://en.wikipedia.org/wiki/Indexed_color#Colors_and_palettes, January 2010.

2 comments:

  1. Lucky Club | Review, Login, Mobile & Casino site | Luckyclub.live
    Lucky Club review. Trusted Lucky Club is a modern and well known casino which is a fantastic place luckyclub.live for slots and other sports. Its games, including roulette, blackjack,

    ReplyDelete