Some information about color depth

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Some information about color depth

Postby Rami » Sun May 23, 2010 1:17 pm

Hello,

this is a sum up:

Android use ARGB_8888 = 32-bit format = 4 bytes for each color = 8 bits for each channel
=4294967296 ( 256 * 256* 256* 256 ) = also in Color class


but how ever mobile screens , for example :

Acer liquid A1

18-bit color depth =(64 × 64 × 64 = 262,144 combinations) = 262k


Iphone :

24-bit color = 16 mil


then you would think that can I use ARGB_4444? which is 16-bit , in that case , i'd say you can do that :)

if there is anything wrong or you have an addition , all are welcome
Rami
Once Poster
Once Poster
 
Posts: 1
Joined: Fri May 21, 2010 10:13 pm

Top

Re: Some information about color depth

Postby ShadowKntSDS » Mon May 24, 2010 5:33 pm

Rami wrote:Hello,

this is a sum up:

Android use ARGB_8888 = 32-bit format = 4 bytes for each color = 8 bits for each channel
=4294967296 ( 256 * 256* 256* 256 ) = also in Color class

Just a minor note, and it might be me misreading your test, but I assume you mean "4 bytes TOTAL, 1 byte =8 bit for each channel". You math is correct though (256 values for each channel). Although while alpha is stored with the textures/bitmaps/etc, its not actually displayed. It's just use to determine how other colors are blended in. ARGB_8888 only really has 256*256*256 colors in the end (same a 24 bit color).


Rami wrote:but how ever mobile screens , for example :

Acer liquid A1

18-bit color depth =(64 × 64 × 64 = 262,144 combinations) = 262k


I'm guessing this is a RGB_666 equivalent. Internally, it could also have an alpha channel.

Rami wrote:Iphone :

24-bit color = 16 mil


then you would think that can I use ARGB_4444? which is 16-bit , in that case , i'd say you can do that :)

if there is anything wrong or you have an addition , all are welcome


ARGB_8888 in the end is only 24 bit color on the display. The alpha channel never really gets seen, but is only used for blending. It is not hard for hardware to take an 8 bit value for a channel and only display 6 bits. You would simply chop off the least significant bits. i.e. 1011_0111 would get truncated to 1011_01 (or it could get rounded to 1011_10, but thats another subject). The point is that it is not hard to down grade the output to a lower color resolution.
ShadowKntSDS
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Apr 28, 2010 10:29 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests