开发者

how many color combinations in a 24 bit image [duplicate]

This question already has answers here: 开发者_运维技巧 Closed 12 years ago.

Possible Duplicate:

how many color combinations in a 24 bit image

I am reading a book and I am not sure if its a mistake or I am misunderstanding the quote. It reads...

Nowadays every PC you can buy has hardware that can render images with at least 16.7 million individual colors. Rather than have an array with thousands of color entries, the images instead contain explicit color values for each pixel. A 24-bit display, of course, uses 24 bits, or 3 bytes per pixel, for color information. This gives 1 byte, or 256 distinct values each, for red, green, and blue. This is generally called true color, because 256^3 (16.7 million)

He says 1 byte is equal to 256 distinct values. 1 byte = 8 bits. 8^2 bits = 64 distinct colors right ?? It's not adding up right to me. I know it might be something simple to understand, but I don't understand.


Each of the red, green, and blue bands has 2^8 (not 8^2!) possible values, that is, 256 distinct possibilities. IOW, with one byte you can "count" from 0 to 255.

So your problem is just that you're confusing the base and exponent involved in the raise-to-power operation in question.


Its not 8^2 , but its 2^8 = 256.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜